|
@@ -277,8 +277,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoSemiRealPlay, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
}
|
|
|
if player.currentPlaybackTime() >= 20.0 || ((playProgress / duration) >= 0.3) {
|
|
@@ -294,8 +293,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_realPlay, videoData: playVideoData, pageSource: nil, businessType: .bt_videoRealPlay, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
}
|
|
|
playVideoData?.playProgress = Float64(playProgress)
|
|
@@ -315,8 +313,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySuccess, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
|
|
|
case PLAY_EVT_PLAY_LOADING.rawValue: // 视频播放loading
|
|
@@ -339,8 +336,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_play, videoData: playVideoData, pageSource: nil, businessType: nil, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
let duration = Int((Date().timeIntervalSince1970 * 1000) - loadingTime)
|
|
|
BFLog(message: "加载时长:\(duration)")
|
|
|
// 加载时间上报
|
|
@@ -350,8 +346,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
keyValue
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Frontend, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySuccessTime, objectType: nil, extParams: timeExtParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
BFLog(message: "首帧加载完成")
|
|
|
case PLAY_EVT_PLAY_END.rawValue: // 播放结束
|
|
@@ -371,8 +366,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams = ["followedUid": "all"]
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayEnd, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
let playDuration = player.currentPlaybackTime() - lastPlaybackTime
|
|
|
debugPrint("当前播放时长:\(player.currentPlaybackTime()),lastPlaybackTime:\(lastPlaybackTime),playDuration:\(playDuration)")
|
|
@@ -403,8 +397,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
case PLAY_ERR_FILE_NOT_FOUND.rawValue: // 播放文件不存在
|
|
|
if playStatusBloc != nil {
|
|
@@ -421,8 +414,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
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 {
|
|
@@ -439,8 +431,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayError, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
}
|
|
|
case PLAY_WARNING_RECONNECT.rawValue: // 断线重连已启动重新连接
|
|
|
if playStatusBloc != nil {
|
|
@@ -454,8 +445,7 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams["followedUid"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayException, objectType: nil, extParams: extParams, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
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()]
|
|
@@ -469,9 +459,8 @@ extension PQSingletoVideoPlayer: TXVodPlayListener {
|
|
|
extParams2["topicId"] = "all"
|
|
|
}
|
|
|
}
|
|
|
- // 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)
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Frontend, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlaySlow, objectType: nil, extParams: extParams1, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
+ BFEventTrackAdaptor.videoRelationReportUpload(reportLogType: .reportLogType_Action, videoData: playVideoData, pageSource: nil, businessType: .bt_videoPlayException, objectType: nil, extParams: extParams2, shareId: nil, videoIds: nil, playId: playId, headVideoId:(playVideoData as? PQVideoListModel)?.headVideoId,projectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.projectId ?? "",parentProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentProjectId ?? "",rootProjectId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.rootProjectId ?? "",canProduce:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.canReproduce ?? 0,parentVideoId:(playVideoData as? PQVideoListModel)?.reCreateVideoData?.parentVideoId ?? "",commonParams:commonParams())
|
|
|
default:
|
|
|
break
|
|
|
}
|