| | |
| | | mounted() {}, |
| | | methods: { |
| | | loadVideo(item) { |
| | | if (item.platResourceId) { |
| | | if (item.code) { |
| | | if (Hls.isSupported()) { |
| | | var video = document.getElementById(item.id); |
| | | var hls = new Hls(); |
| | | videoPoint.getVideoPointUrl(item.platResourceId).then((res) => { |
| | | videoPoint.getVideoPointUrl(item.code).then((res) => { |
| | | if (res.code === 0) { |
| | | hls.loadSource(res.data); |
| | | hls.attachMedia(video); |
| | |
| | | if (res) { |
| | | // 连接客户端成功 |
| | | this.ws.login({ |
| | | loginIp: "183.245.159.161", |
| | | loginPort: "8282", |
| | | loginIp: "172.28.194.180", |
| | | loginPort: "7902", |
| | | userName: "suichang", |
| | | userPwd: "a12345677", |
| | | https: 1, |
| | |
| | | }); |
| | | }, |
| | | create(item) { |
| | | if (item.code) { |
| | | if (item.platResourceId) { |
| | | const DHWsInstance = DHWs.getInstance(); |
| | | this.ws = DHWsInstance; |
| | | console.log(this.ws); |