34 lines
912 B
TypeScript
34 lines
912 B
TypeScript
// import { ref, nextTick, onBeforeUnmount} from 'vue';
|
|
|
|
// export const rtcServerUrl = import.meta.env.VITE_GLOB_RTC_SERVER;
|
|
|
|
export function getDefOptions(object) {
|
|
// const windowObj = <any>window;
|
|
// const WebRtcStreamer = windowObj.WebRtcStreamer;
|
|
let o = {
|
|
autoplay: false,
|
|
controls: true,
|
|
muted: true,
|
|
errorDisplay: false,
|
|
preload: 'auto',
|
|
language: 'zh-CN',
|
|
aspectRatio: "16:9",
|
|
fluid: true,
|
|
liveui: true,
|
|
hotkeys: false,
|
|
caches: true,
|
|
// playbackRates: [1,2,3,4,5,8,10,20],
|
|
trechIrder: ['flash'],
|
|
// sources: [{
|
|
// // type: 'rtmp/flv',
|
|
// // src: 'rtmp://127.0.0.1:1935/live/soures',
|
|
// type: 'application/x-mpegURL',
|
|
// src: 'http://127.0.0.1/live_hls/soures.m3u8',
|
|
// }],
|
|
flash: {
|
|
swf: 'https://cnd.bootcdn.net/ajax/libs/videojs-swf/5.4.2/video-js.swf',
|
|
}
|
|
};
|
|
return Object.assign(o,object);
|
|
}
|