- 4.代码使用
- 4.1 [A]swfObject调用
- 4.2 [B]object调用
- 4.3 [C]Ebemb调用
- 4.4 [D]JS形式调用
- 4.5 函数接口
- 4.6 广告相关
- [1] 前置广告
- [2] 视频广告
- [3] 暂停广告
- [4] 角标广告
- [5] 后置广告
- 4.7 开灯关灯
- 4.8 高清模式
- 4.9 分享模式
- 4.10 视频模式
- 4.11 RTMP点播
- 4.12 RTMP直播
- 4.13 视频结束动作
- 4.14 色彩自定义
- 4.15 移动终端适配(New)
- 4.16 HLS直播(m3u8适配)
- 4.17 适配PC/安卓/苹果
- 4.18 收费模式(节目预览)
4.2 object调用
object调用,是adobe官方的调用方式。以下三种写法,都是object的调用方式。object调用时一般是以flashvars传值。细心的朋友,也许会发现object代码,还含 有embed代码,确实如此,embed代码包含其中。
例(4.2)-1:object调用示例1
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="400" id="simplevideostreaming" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/Player/player.swf" />
<param name="FlashVars" value="&JcScpFile=/Player/CuSunV2Set.xml&JcScpVideoPath=http://demo.cuplayer.com/file/test.mp4&JcScpImg=/Player/Images/CuplayerDefault.jpg" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="PlayerV11.swf" flashvars="&JcScpFile=/Player/CuSunV2Set.xml&JcScpVideoPath=http://demo.cuplayer.com/file/test.mp4&JcScpImg=/Player/Images/CuplayerDefault.jpg" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
例(4.2)-2:object调用示例2
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="400" id="simplevideostreaming" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/Player/player.swf?FlvID=745" />
<param name="FlashVars" value="&JcScpFile=/Player/CuSunV2Set.asp" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="/Player/player.swf" flashvars="&JcScpFile=/Player/CuSunV2Set.asp" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
例(4.2)-3:object调用示例3
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="400" id="simplevideostreaming" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/Player/player.swf?FlvID=745&JcScpFile=/Player/CuSunV2Set.asp" />
<param name="FlashVars" value="" />
<param name="quality" value="high" /><param name="bgcolor" value="#000000" />
<embed src="/Player/player.swf?FlvID=745&JcScpFile=/Player/CuSunV2Set.asp" flashvars="" quality="high" bgcolor="#000000" width="600" height="400" name="simplevideostreaming" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>