去除ssrc作为流ID传递,ssrc只作为sdp消息使用。动态端口的情况下支持固定流地址,同时支持未点播时直接播放流地址,代码自动发起点播

This commit is contained in:
panlinlin
2020-12-19 21:52:20 +08:00
parent 0188ffd19f
commit b0080159d9
17 changed files with 117 additions and 127 deletions

View File

@@ -187,9 +187,9 @@ export default {
url: '/api/play/' + deviceId + '/' + channelId + '?getEncoding=' + getEncoding
}).then(function (res) {
console.log(res.data)
let ssrc = res.data.ssrc;
let streamId = res.data.streamId;
that.isLoging = false;
if (!!ssrc) {
if (!!streamId) {
// that.$refs.devicePlayer.play(res.data, deviceId, channelId, itemData.hasAudio);
that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
streamInfo: res.data,
@@ -212,7 +212,7 @@ export default {
var that = this;
this.$axios({
method: 'post',
url: '/api/play/' + itemData.ssrc + '/stop'
url: '/api/play/' + itemData.streamId + '/stop'
}).then(function (res) {
console.log(JSON.stringify(res));
that.initData();