Mod uses h264 stream for public players
This commit is contained in:
parent
5d5fad5e4a
commit
a5bddc5bbf
@ -23,7 +23,7 @@
|
||||
{{/if}}
|
||||
</head>
|
||||
<body>
|
||||
<div style="position:absolute;top:0;right:0;bottom:0;left:0">
|
||||
<div style="position:absolute;top:0;right:0;bottom:0;left:0;background-color:black;">
|
||||
<video id="player" class="vjs-public video-js" controls playsinline></video>
|
||||
</div>
|
||||
<script src="player/videojs/dist/video.min.js"></script>
|
||||
|
||||
@ -2259,9 +2259,12 @@ class Restreamer {
|
||||
async UpdatePlayerConfig(channelid, metadata) {
|
||||
metadata.player = this.InitPlayerSettings(metadata.player);
|
||||
|
||||
// use h264 preview stream if enabled
|
||||
const channel_id_h264 = metadata.control.preview?.enable ? `${channelid}_h264`: channelid
|
||||
|
||||
const playerConfig = {
|
||||
...metadata.player,
|
||||
source: this.GetChannelManifestPath(channelid, metadata.control.hls.storage),
|
||||
source: this.GetChannelManifestPath(channel_id_h264, metadata.control.hls.storage),
|
||||
poster: this.GetChannelPosterPath(channelid, metadata.control.hls.storage),
|
||||
license: {
|
||||
license: metadata.license,
|
||||
|
||||
@ -336,6 +336,7 @@ export default function Edit({ restreamer = null }) {
|
||||
|
||||
const storage = $metadata.control.hls.storage;
|
||||
const manifest = restreamer.GetChannelAddress('hls+' + storage, _channelid);
|
||||
const manifest_preview = restreamer.GetChannelAddress('hls+' + storage, `${_channelid}_h264`);
|
||||
const poster = $settings.poster ? prepareUrl($settings.poster) : restreamer.GetChannelAddress('snapshot+' + storage, _channelid);
|
||||
const playerAddress = restreamer.GetPublicAddress('player', _channelid);
|
||||
const iframeCode = restreamer.GetPublicIframeCode(_channelid);
|
||||
@ -361,7 +362,7 @@ export default function Edit({ restreamer = null }) {
|
||||
<Player
|
||||
key={$revision}
|
||||
type={$player}
|
||||
source={manifest}
|
||||
source={$metadata.control.preview?.enable ? manifest_preview : manifest}
|
||||
autoplay={$settings.autoplay}
|
||||
mute={$settings.mute}
|
||||
poster={poster}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user