1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <div>
- <div id="divPlugin" class="plugin"></div>
- </div>
- </template>
- <script>
- export default {
- name: "videojs",
- components:{},
- data(){
- return{
- g_iWndIndex:0,
- }
- },
- mounted() {
- var that=this;
- setTimeout(()=>{
- this.initVideoPlay('192.168.101.64', '80', 'admin', 'zxy123456','divPlugin')
- },2000)
-
- },
- beforeDestroy() {
-
- },
- methods:{
- initVideoPlay(ip, port, username, password,id){
- console.log(2)
- // 初始化插件参数及插入插件
- WebVideoCtrl.I_InitPlugin(500, 300, {
- bWndFull: true, //是否支持单窗口双击全屏,默认支持 true:支持 false:不支持
- iPackageType: 2,
- //szColorProperty:"plugin-background:0000ff; sub-background:0000ff; sub-border:00ffff; sub-border-select:0000ff", //2:PS 11:MP4
- iWndowType: 1,
- cbSelWnd: function (xmlDoc) {
- // g_iWndIndex = parseInt($(xmlDoc).find("SelectWnd").eq(0).text(), 10);
- // var szInfo = "当前选择的窗口编号:" + g_iWndIndex;
- // showCBInfo(szInfo);
- },
- cbDoubleClickWnd: function (iWndIndex, bFullScreen) {
- // var szInfo = "当前放大的窗口编号:" + iWndIndex;
- // if (!bFullScreen) {
- // szInfo = "当前还原的窗口编号:" + iWndIndex;
- // }
- // showCBInfo(szInfo);
- },
- cbEvent: function (iEventType, iParam1, iParam2) {
- // if (2 == iEventType) {// 回放正常结束
- // showCBInfo("窗口" + iParam1 + "回放结束!");
- // } else if (-1 == iEventType) {
- // showCBInfo("设备" + iParam1 + "网络错误!");
- // } else if (3001 == iEventType) {
- // clickStopRecord(g_szRecordType, iParam1);
- // }
- },
- cbRemoteConfig: function () {
- // showCBInfo("关闭远程配置库!");
- },
- cbInitPluginComplete: function () {
- WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(
- ()=>{
-
- }
- );
- console.log(222)
- // 检查插件是否最新
- // if (-1 == WebVideoCtrl.I_CheckPluginVersion()) {
- // alert("检测到新的插件版本,双击开发包目录里的WebComponentsKit.exe升级!");
- // return;
- // }
- }
- });
- }
- }
- }
- </script>
|