首页
社区
课程
招聘
[原创]某在线视频播放器之去广告分析
发表于: 2014-9-1 22:23 2568

[原创]某在线视频播放器之去广告分析

2014-9-1 22:23
2568

在看雪混了这么久,第一次发个帖子,技术不够,分析不到位,还望海涵。
最近忙着开学适宜瞎折腾–这两天Zero忙着视频去广告,话说广告越来越泛滥了,有的视频开通广告都超过60s了。某个视频站点的他去掉了,但是有个一直没搞定。让我帮他看看。

源码是他给我的,我没有swf反编译器。

大概看了下结构,ActionScript我没有学过。他说跟Java差不多,我也就懒得看基本语法了,直接上。先看下主文件Player.as的头吧,看看有哪些引用。

    import com.iqiyi.components.global.*;
    import com.iqiyi.components.tooltip.*;
    import com.qiyi.player.base.pub.*;
    import com.qiyi.player.base.uuid.*;
    import com.qiyi.player.core.*;
    import com.qiyi.player.core.model.def.*;
    import com.qiyi.player.core.model.utils.*;
    import com.qiyi.player.wonder.*;
    import com.qiyi.player.wonder.body.view.*;
    import com.qiyi.player.wonder.common.config.*;
    import com.qiyi.player.wonder.common.lso.*;
    import com.qiyi.player.wonder.common.pingback.*;
    import com.qiyi.player.wonder.common.sw.*;
    import flash.display.*;
    import flash.events.*;
    import flash.media.*;
    import flash.system.*;
    import flash.utils.*;
package com.qiyi.player.wonder.common.config
{

    public class FlashVarConfig extends Object
    {
        public static const OWNER_PAGE:String = "page";
        public static const OWNER_CLIENT:String = "client";
        public static const OS_XP:String = "xp";
        public static const OS_WIN7:String = "win7";
        public static const OS_WIN8:String = "win8";
        public static const PAGE_OPEN_SRC_NONE:String = "0";
        public static const PAGE_OPEN_SRC_DIRECT:String = "1";
        public static const PAGE_OPEN_SRC_OTHER:String = "2";
        private static var _flashVarSource:Object;
        private static var _albumId:String = "";
        private static var _tvid:String = "0";
        private static var _vid:String = "";
        private static var _autoPlay:Boolean = true;
        private static var _isMemberMovie:Boolean = false;
        private static var _cyclePlay:Boolean = false;
        private static var _components:String = "fefff7e6";
        private static var _cupId:String = "";
        private static var _shareStartTime:int = -1;
        private static var _shareEndTime:int = -1;
        private static var _preloaderURL:String = "http://dispatcher.video.qiyi.com/dispn/player/preloader.swf";
        private static var _preloaderVipURL:String = "";
        private static var _exclusivePreloader:String = "";
        private static var _useGPU:Boolean = true;
        private static var _showBrand:Boolean = true;
        private static var _expandState:Boolean = false;
        private static var _tipDataURL:String = "http://static.qiyi.com/ext/tips/tipdata.xml";
        private static var _coop:String = "";
        private static var _owner:String = "page";
        private static var _os:String = "win7";
        private static var _adPlayerURL:String = "";
        private static var _origin:String = "";
        private static var _passportID:String = "";
        private static var _playListID:String = "";
</item>
<!-- 正在为您播放片中广告, 可选择是否要跳过, 类别是1, 持续时间是8秒 -->
<!-- 限制条件是:  不是正在登录中的会员 -->
<!-- 每天每人次只最多显示两次这个tips -->
<item id="ToSelectWhetherToSkipPlayingMiddleAD" level="1" duration="-1" type="1">
<conditions>
<fields>
<field name="member" operator="eq" value="false"/>
</fields>
<frequency count="2">
<restrain name="day"/>
<restrain name="user"/>
</frequency>
</conditions>
<list>
<message>
<![CDATA[
正在为您播放片中广告, <a href="event:ASEvent(skipAD)"><b><u>跳过广告</u></b></a>
]]>
</message>
</list>
</item>
<!-- 提示即将跳过8秒后会显示的剧中广告, 类别是1, 持续时间是8秒 -->
<!-- 必须是登录的会员 -->
<item id="ToCancelSkipNextMiddleAD" level="1" duration="8" type="1">
<conditions>
<fields>
<field name="member" operator="eq" value="true"/>
</fields>
<frequency count="1">
<restrain name="day"/>
<restrain name="user"/>
</frequency>
</conditions>
<list>
<message>
<![CDATA[
即将为您跳过片中广告,<a href="event:ASEvent(cancelSkipAD)"><u>不再跳过</u></a>
]]>
</message>
</list>
</item>
<!--
提示版权下线, 如果还有小于7天的时间下线, 每天一个专辑一台电脑提醒一次, 类别是1, 从起始60秒开始显示, 持续时间是10秒
-->
<!-- 因为优先级很高, 前面的最高优先级是10, 所以这里把level设为11. -->
<!-- 这个tip是由signal发起的. Shawn.X  -->
<!--
《<span>#keyword#</span>》 将于  <span>#expiredTime#</span> 版权到期.
-->
<item id="NoticeThisCopyrightWillExpire" level="11" duration="10" type="1">
<conditions>
public function CupidAdPlayer(param1:CupidParam)
        {
            this.PLAYER_TIMEOUT_LENGTHS = new Array(10000, 15000);
            Log.info("init, version=" + VERSION + ", " + param1.toString());
            this._videoPlayerVersion = param1.videoPlayerVersion;
            this._videoId = param1.videoId;
            this._tvId = param1.tvId;
            this._channelId = param1.channelId;
            this._collectionId = param1.collectionId;
            this._playerId = param1.playerId;
            this._albumId = param1.albumId;
            this._userId = param1.userId;
            this._webEventId = param1.webEventId;
            this._videoEventId = param1.videoEventId;
            this._vipRight = param1.vipRight;
            this._terminal = param1.terminal;
            this._duration = param1.duration;
            this._passportId = param1.passportId;
            this._passportCookie = param1.passportCookie;
            this._passportKey = param1.passportKey;
            this._videoDefinitionId = param1.videoDefinitionId;
            if (this.isQiyiWebEx())
            {
                this._playerUrl = this.IQIYI_WEBEX_AM_URL;
            }
            else if (param1.playerUrl)
            {
                this._playerUrl = param1.playerUrl;
            }
            else
            {
                this._playerUrl = this.IQIYI_WEB_AM_URL;
            }
            if (param1.dispatcher == null)
            {
                this._dispatcher = this;
            }
            else
            {
                this._dispatcher = param1.dispatcher;
            }
            this._volume = param1.volume;
            this._videoIndex = param1.videoIndex;
            this._stageWidth = param1.stageWidth;
            this._stageHeight = param1.stageHeight;
            this._displayContainer = param1.adContainer;
            this._screenStatus = DisplayProperties.isFullScreen(this._displayContainer.stage) ? ("1") : ("0");
            this._baiduMainVideo = param1.baiduMainVideo;
            this._disablePreroll = param1.disablePreroll;
            this._disableSkipAd = param1.disableSkipAd;
            this._enableVideoCore = param1.enableVideoCore;
            this._isUGC = param1.isUGC;
            this._videoPlayerUrl = this._displayContainer.loaderInfo ? (this._displayContainer.loaderInfo.loaderURL) : ("");
            this._env = this.generateEnv();
            this.addAdPlayerEventListeners();
            return;
        }// end function
private var _adPlayer:CupidAdPlayer;

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 1
支持
分享
最新回复 (10)
雪    币: 60
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
# 前 留名。
2014-9-1 22:46
0
雪    币: 1392
活跃值: (5107)
能力值: ( LV13,RANK:240 )
在线值:
发帖
回帖
粉丝
3
iqiyi youku 这些播放器最多就是混淆类名,函数名。处理还是挺简单的。楼主可以试试土豆的,看看如何
2014-9-2 09:21
0
雪    币: 3366
活跃值: (1333)
能力值: ( LV4,RANK:40 )
在线值:
发帖
回帖
粉丝
4
土豆有广告?还真没注意--看火影的时候没见啊。

看到你的土X的帖子了 学习
2014-9-2 09:42
0
雪    币: 53
活跃值: (734)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
不错 感谢分享
2014-9-2 11:33
0
雪    币: 341
活跃值: (138)
能力值: ( LV7,RANK:110 )
在线值:
发帖
回帖
粉丝
6
7月有个手机号码不要了,开了个qiyiVIP。。。就欠费了,然后现在依旧VIP。。。。。
2014-9-2 12:15
0
雪    币: 69
活跃值: (157)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
7
可以分析下sohu的, 加密了. 有点挑战. 这些东西,研究一下去广告的规则,很快就找出来了.
2014-9-2 14:54
0
雪    币: 3366
活跃值: (1333)
能力值: ( LV4,RANK:40 )
在线值:
发帖
回帖
粉丝
8
搜狐的已经搞定了,只是没写总结。
2014-9-2 18:02
0
雪    币: 3366
活跃值: (1333)
能力值: ( LV4,RANK:40 )
在线值:
发帖
回帖
粉丝
9
貌似以前卡过QQ会员-- 现在还有这种用途么。。。。
2014-9-2 18:04
0
雪    币: 68
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
不明角力啊!
2014-9-2 19:09
0
雪    币: 61
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
谢谢分享
2014-9-2 20:02
0
游客
登录 | 注册 方可回帖
返回
//