|
@@ -277,7 +277,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoSemiRealPlay, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoSemiRealPlay, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
}
|
|
|
if player.currentPlaybackTime() >= 20.0 || ((playProgress / duration) >= 0.3) {
|
|
@@ -293,7 +294,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_realPlay, videoData: playVideoData, pageSource: nil, businessType: .bt_videoRealPlay, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_realPlay, videoData: playVideoData, pageSource: nil, businessType: .bt_videoRealPlay, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
}
|
|
|
playVideoData?.playProgress = Float64(playProgress)
|
|
@@ -313,7 +315,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySuccess, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySuccess, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
|
|
|
case PLAY_EVT_PLAY_LOADING.rawValue: // 视频播放loading
|
|
@@ -336,7 +339,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_play, videoData: playVideoData, pageSource: nil, businessType: nil, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_play, videoData: playVideoData, pageSource: nil, businessType: nil, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
let duration = Int((Date().timeIntervalSince1970 * 1000) - loadingTime)
|
|
|
BFLog(message: "加载时长:\(duration)")
|
|
|
// 加载时间上报
|
|
@@ -346,7 +350,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
keyValue
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Frontend, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySuccessTime, objectType: nil, extParams: timeExtParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Frontend, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySuccessTime, objectType: nil, extParams: timeExtParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
BFLog(message: "首帧加载完成")
|
|
|
case PLAY_EVT_PLAY_END.rawValue: // 播放结束
|
|
@@ -366,7 +371,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayEnd, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayEnd, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
let playDuration = player.currentPlaybackTime() - lastPlaybackTime
|
|
|
debugPrint("当前播放时长:\(player.currentPlaybackTime()),lastPlaybackTime:\(lastPlaybackTime),playDuration:\(playDuration)")
|
|
@@ -397,7 +403,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
case PLAY_ERR_FILE_NOT_FOUND.rawValue: // 播放文件不存在
|
|
|
if playStatusBloc != nil {
|
|
@@ -414,7 +421,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
case PLAY_ERR_HEVC_DECODE_FAIL.rawValue, PLAY_ERR_HLS_KEY.rawValue, PLAY_ERR_GET_PLAYINFO_FAIL.rawValue, PLAY_WARNING_VIDEO_DECODE_FAIL.rawValue, PLAY_WARNING_AUDIO_DECODE_FAIL.rawValue: // H265解码失败,HLS解码key获取失败,获取点播文件信息失败,当前视频解码失败,当前音频解码失败
|
|
|
if playStatusBloc != nil {
|
|
@@ -431,8 +439,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
}
|
|
|
case PLAY_WARNING_RECONNECT.rawValue: // 断线重连已启动重新连接
|
|
|
if playStatusBloc != nil {
|
|
@@ -446,7 +454,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayException, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayException, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId)
|
|
|
case PLAY_WARNING_RECV_DATA_LAG.rawValue, PLAY_WARNING_VIDEO_PLAY_LAG.rawValue: // 网络来包不稳:可能是下行带宽不足 | 当前视频播放出现卡顿(用户直观感受)
|
|
|
// 播放失败
|
|
|
var extParams1: [String: Any] = ["pageSource": playVideoData!.pageSource.rawValue, "networkType": networkStatus(), "url": playVideoData?.videoPath ?? "", "videoId": playVideoData?.uniqueId ?? "0", "what": event, "position": player.currentPlaybackTime()]
|
|
@@ -460,8 +469,9 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams2["topicId"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Frontend, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySlow, objectType: nil, extParams: extParams1, shareId: nil, videoIds: nil, playId: playId)
|
|
|
- PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayException, objectType: nil, extParams: extParams2, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+ // MARK: SanW--待修改-2021.12.09
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Frontend, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySlow, objectType: nil, extParams: extParams1, shareId: nil, videoIds: nil, playId: playId)
|
|
|
+// PQEventTrackViewModel.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayException, objectType: nil, extParams: extParams2, shareId: nil, videoIds: nil, playId: playId)
|
|
|
default:
|
|
|
break
|
|
|
}
|