Ver Fonte

update eventData

wenweiwei há 3 anos atrás
pai
commit
987992ce22

+ 12 - 23
BFStuckPointKit/Classes/BFUtils/PQSingletoVideoPlayer.swift

@@ -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
         }

+ 0 - 7
BFStuckPointKit/Classes/Controller/PQStuckPointEditerController.swift

@@ -6,13 +6,6 @@
 //  Copyright © 2021 BytesFlow. All rights reserved.
 //  功能:卡点音乐编辑界面
 
-// 创建不同玩法的类型 (1:跳跃卡点,2:快慢速,3:仅配乐)
-public enum createStickersModel: Int {
-    case createStickersModelPoint = 1 // 跳跃卡点
-    case createStickersModelSpeed = 2 // 快慢速
-    case createStickersModelOnlyMusic = 3 // 仅配乐
-}
-
 import BFAnalyzeKit
 import BFCommonKit
 import BFUIKit

+ 103 - 7
BFStuckPointKit/Classes/Controller/PQStuckPointPublicController.swift

@@ -1362,10 +1362,7 @@ extension PQStuckPointPublicController {
     /// 生成创作工具埋点数据
     /// - Returns: <#description#>
     func getExportEventTrackData() -> PQVideoMakeEventTrackModel? {
-        // MARK: SanW--待修改-2021.12.09
-
-//        let eventTrackData = PQVideoMakeEventTrackModel(projectModel: editProjectModel, reCreateData: reCreateData)
-        let eventTrackData = PQVideoMakeEventTrackModel()
+        let eventTrackData = createEventTrackData(projectModel: editProjectModel, reCreateData: reCreateData)
         eventTrackData.entrance = .entranceStuckPointPublic
         eventTrackData.editTimeCost = 0
         eventTrackData.composeTimeCost = (exportEndDate - startExportDate) * 1000
@@ -1390,14 +1387,113 @@ extension PQStuckPointPublicController {
         eventTrackData.syncedUpOriginalMaterialDuration = selectedTotalDuration * 1000
         eventTrackData.syncedUpRhythmNumber = audioMixModel?.speed ?? 2
         eventTrackData.syncedUpVideoDuration = ((audioMixModel?.endTime ?? 0) - (audioMixModel?.startTime ?? 0)) * 1000
-        // MARK: SanW--待修改-2021.12.09
-//        eventTrackData.syncedUpVideoType = rhythmMode
+        eventTrackData.syncedUpVideoType = rhythmMode
         eventTrackData.syncedUpVideoSpeedMax = syncedUpVideoSpeedMax
         eventTrackData.syncedUpVideoSpeedMin = syncedUpVideoSpeedMin
-
+        eventTrackData.abInfoData = PQSingletoMemoryUtil.shared.abInfoData
         return eventTrackData
     }
 
+    
+    /// 初始化
+    /// - Parameter projectModel: <#projectModel description#>
+   public func createEventTrackData(projectModel: PQEditProjectModel?, reCreateData: PQReCreateModel?) -> PQVideoMakeEventTrackModel {
+       let eventTrackData = PQVideoMakeEventTrackModel.init()
+        if projectModel != nil {
+            eventTrackData.draftId = projectModel?.draftboxId
+            eventTrackData.projectId = projectModel?.projectId
+            eventTrackData.sectionNum = projectModel?.sData?.sections.count ?? 1
+            if projectModel?.sData?.sections != nil, (projectModel?.sData?.sections.count ?? 0) > 0 {
+                for section in (projectModel?.sData?.sections)! {
+                    if section.sectionType == "normal" {
+                        // 段落中的文字长度信息
+                        let voiceType: VOICETYPT? = VOICETYPT(rawValue: section.sectionTimeline?.audioTrack?.audioTrackMaterials.first?.voiceType ?? "")
+                        if voiceType == .SPEECH || voiceType == .LOCAL {
+                            eventTrackData.secTextLength.append(section.getInputSubtitle().count)
+                        } else {
+                            eventTrackData.secTextLength.append(section.sectionText.count)
+                        }
+                        // 段落中使用的语音素材名称
+                        eventTrackData.secTextToSpeechMaterial.append(section.sectionTimeline?.audioTrack?.audioTrackMaterials.first?.produceVoiceConfig?.voice ?? "")
+                        // 段落中文字转语音的毫秒数
+                        var duration: Float64 = 0
+                        if voiceType != nil && section.audioFilePath.count > 0 {
+                            let audioAsset = AVURLAsset(url: URL(fileURLWithPath: documensDirectory + section.audioFilePath), options: avAssertOptions)
+                            duration = Float64(audioAsset.duration.seconds * 1000)
+                        }
+                        if voiceType == .SPEECH || voiceType == .LOCAL {
+                            eventTrackData.secSpeechToTextTime.append(Int64(duration))
+                            eventTrackData.secTextToSpeechTime.append(0)
+                        } else {
+                            eventTrackData.secTextToSpeechTime.append(Int64(duration))
+                            eventTrackData.secSpeechToTextTime.append(0)
+                        }
+                        // 本地图片数量
+                        var localImageCount: Int = 0
+                        // 本地gif数量
+                        var localGifCount: Int = 0
+                        // 本地视频数量
+                        var localVideoCount: Int = 0
+                        // 网络图片数量
+                        var netImageCount: Int = 0
+                        // 网络gif数量
+                        var netGifCount: Int = 0
+                        // 网络视频数量
+                        var netVideoCount: Int = 0
+                        if section.sectionTimeline?.visionTrack?.visionTrackMaterials != nil, (section.sectionTimeline?.visionTrack?.visionTrackMaterials.count ?? 0) > 0 {
+                            for visionMaterial in (section.sectionTimeline?.visionTrack?.visionTrackMaterials)! {
+                                switch visionMaterial.type {
+                                case "image":
+                                    if visionMaterial.netResCoverImageURL != nil, (visionMaterial.netResCoverImageURL?.count ?? 0) > 0 {
+                                        netImageCount += 1
+                                    } else {
+                                        localImageCount += 1
+                                    }
+                                case "gif":
+                                    if visionMaterial.netResCoverImageURL != nil, (visionMaterial.netResCoverImageURL?.count ?? 0) > 0 {
+                                        netGifCount += 1
+                                    } else {
+                                        localGifCount += 1
+                                    }
+                                case "video":
+                                    if visionMaterial.netResUrl.count > 0 {
+                                        netVideoCount += 1
+                                    } else {
+                                        localVideoCount += 1
+                                    }
+                                default:
+                                    break
+                                }
+                            }
+                        }
+                        // 本地素材图片数量
+                        eventTrackData.secLocalImageNum.append(localImageCount)
+                        // 本地素材动图数量
+                        eventTrackData.secLocalGifNum.append(localGifCount)
+                        // 本地素材视频数量
+                        eventTrackData.secLocalVideoNum.append(localVideoCount)
+                        // 网络素材图片数量
+                        eventTrackData.secCloudImageNum.append(netImageCount)
+                        // 网络素材动图数量
+                        eventTrackData.secCloudGifNum.append(netGifCount)
+                        // 网络素材视频数量
+                        eventTrackData.secCloudVideoNum.append(netVideoCount)
+                    } else {
+                        eventTrackData.sectionNum = eventTrackData.sectionNum - 1
+                        if eventTrackData.sectionNum <= 0 {
+                            eventTrackData.sectionNum = 1
+                        }
+                    }
+                }
+            }
+        }
+        if reCreateData != nil {
+            eventTrackData.fatherProjectId = reCreateData?.projectId
+            eventTrackData.rootProjectId = reCreateData?.rootProjectId ?? reCreateData?.projectId
+            eventTrackData.fatherDraftId = reCreateData?.draftboxId
+        }
+       return eventTrackData
+    }
     /// 播放视频
     /// - Returns: description
     @objc func playVideo() {

+ 9 - 3
Example/Podfile.lock

@@ -15,6 +15,7 @@ PODS:
     - BFCommonKit/BFProtocols (= 1.5.2)
     - BFCommonKit/BFUtility (= 1.5.2)
     - BFCommonKit/BFVendors (= 1.5.2)
+    - BFCommonKit/BFVendorsUtils (= 1.5.2)
   - BFCommonKit/BFCategorys (1.5.2):
     - KingfisherWebP (= 1.3.0)
   - BFCommonKit/BFConfig (1.5.2):
@@ -36,6 +37,11 @@ PODS:
     - KingfisherWebP (= 1.3.0)
     - Toast-Swift (= 5.0.1)
   - BFCommonKit/BFVendors (1.5.2)
+  - BFCommonKit/BFVendorsUtils (1.5.2):
+    - BFCommonKit/BFEnums
+    - BFCommonKit/BFProtocols
+    - BFCommonKit/BFUtility
+    - RealmSwift (= 10.7.6)
   - BFMaterialKit (0.2.0):
     - BFUIKit
   - BFMediaKit (0.1.0):
@@ -54,7 +60,7 @@ PODS:
     - BFUIKit
     - Bugly (= 2.5.90)
     - LMJHorizontalScrollText (= 2.0.2)
-    - MJRefresh (= 3.7.2)
+    - MJRefresh (~> 3.0)
     - TXLiteAVSDK_Player (= 9.3.10765)
     - WechatOpenSDK-Swift (= 1.8.7.1)
   - BFUIKit (0.1.2):
@@ -179,11 +185,11 @@ SPEC CHECKSUMS:
   Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9
   AliyunOSSiOS: b8f1dfc229cd9abf68c8ee0cb245c2d66e00dd96
   BFAnalyzeKit: 457ecf2fcb09cb83417e2adea50f98c60a50ddec
-  BFCommonKit: 86a8c8818c9430b01ee654ba60eb5cb8b863c0e6
+  BFCommonKit: a16175825b1aec5fcce898ec7beea0927bd06840
   BFMaterialKit: 0a15786e2a55587f1b2b4b74c0bff5321ebf3630
   BFMediaKit: 84a6f93a937e09a1b5b8ef56759a24d7c293b09e
   BFNetRequestKit: 1d074023eafe7c272fab4ed3a608e685902235d0
-  BFStuckPointKit: e3b2dcd9e2cfd5e5e1819f0866f258f7cc2dff16
+  BFStuckPointKit: f1c94ed421f5f1b4bfe20775ce542e587550a085
   BFUIKit: f209190fb92c8f9050554ac5950a2e4852e8a481
   Bugly: 88bc32c0acc6fef7b74d610f0319ee7560d6b9fe
   FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0