zoukankan      html  css  js  c++  java
  • AS3 流媒体历史记录实现

    private function onSavePlayerHistoryList(event:PlayerEvent) : void
            {
                var historyTimeData:Object;
                var event:* = event;
                clearTimeout(this.addLater);
                if (ExternalInterface.available)
                {
                    try
                    {
                        historyTimeData = new Object();
                        historyTimeData.tvId = this.model.videoInfo.tvid;
                        historyTimeData.videoId = this.model.videoInfo.vid;
                        historyTimeData.videoName = this.model.videoInfo.title;
                        historyTimeData.videoUrl = this.model.videoInfo.pageURL;
                        historyTimeData.albumId = this.model.videoInfo.albumId;
                        historyTimeData.albumName = this.model.videoInfo.albumName;
                        historyTimeData.albumUrl = this.model.videoInfo.albumUrl;
                        historyTimeData.charge = "0";
                        historyTimeData.terminalId = 11;
                        historyTimeData.channelId = this.model.videoInfo.categoryId;
                        switch(event.message)
                        {
                            case "-1":
                            {
                                historyTimeData.videoPlayTime = -1;
                                this.model.videoPlayTime = -1;
                                break;
                            }
                            case "0":
                            {
                                historyTimeData.videoPlayTime = 0;
                                this.model.videoPlayTime = 0;
                                break;
                            }
                            default:
                            {
                                historyTimeData.videoPlayTime = int(event.message);
                                this.model.videoPlayTime = Math.floor(int(event.message) * 1000);
                                break;
                                break;
                            }
                        }
                        historyTimeData.videoDuration = this.model.videoInfo.totalDuration;
                        historyTimeData.allSet = this.model.videoInfo.allSet;
                        historyTimeData.nextTvid = this.model.videoInfo.nextTvid;
                        historyTimeData.nextUrl = this.model.videoInfo.nextVideoUrl;
                        historyTimeData.addtime = this.model.serverTime + Math.floor(getTimer() / 1000);
                        ExternalInterface.call("postVideoId", historyTimeData);
                        this.playerHistoryUtils.addFlashCookie(historyTimeData);
                    }
                    catch (error:SecurityError)
                    {
                        addLater = setTimeout(playerHistoryUtils.addFlashCookie, 100, historyTimeData);
                        ;
                    }
                    catch (error:Error)
                    {
                        addLater = setTimeout(playerHistoryUtils.addFlashCookie, 100, historyTimeData);
                    }
                }
                return;
     }// end function
    

      

  • 相关阅读:
    Vue 导出excel 自适应宽度
    .Net 5.0 项目数据库连接字符串
    .Net 5.0 从api下载文件到本地
    Oracle for 循环输出(游标提取)
    找到多个与名为“Home”的控制器匹配的类型
    让tomcat使用指定JDK
    .NetCore 3 单文件发布详解
    CentOS7 常用命令大全
    阿里云ECS CentOS 7.8 安装图形化桌面GNOME
    用命令禁用本地连接
  • 原文地址:https://www.cnblogs.com/rmbteam/p/2731205.html
Copyright © 2011-2022 走看看