Set thumbnail for YouTube option
This commit is contained in:
parent
eb9f6baca5
commit
66b259a105
|
@ -12,6 +12,7 @@ const {
|
||||||
AudioAttributes,
|
AudioAttributes,
|
||||||
|
|
||||||
ShowBackAndForward,
|
ShowBackAndForward,
|
||||||
|
BigPlayButton = false,
|
||||||
|
|
||||||
YouTube = false,
|
YouTube = false,
|
||||||
YouTubeQuality = '137',
|
YouTubeQuality = '137',
|
||||||
|
@ -43,6 +44,7 @@ if (YouTube === true) {
|
||||||
// 1080p = 137
|
// 1080p = 137
|
||||||
// 720p = 302
|
// 720p = 302
|
||||||
// Dash Audio = 251
|
// Dash Audio = 251
|
||||||
|
var YTThumbnail = 'https://i.ytimg.com/vi/' + WatchId +'/maxresdefault.jpg'
|
||||||
var YTVideo = 'https://' + Invidious +'/latest_version?id=' + WatchId + '&itag=' + YouTubeQuality
|
var YTVideo = 'https://' + Invidious +'/latest_version?id=' + WatchId + '&itag=' + YouTubeQuality
|
||||||
var YTAudio = 'https://' + Invidious +'/latest_version?id=' + WatchId + '&itag=251'
|
var YTAudio = 'https://' + Invidious +'/latest_version?id=' + WatchId + '&itag=251'
|
||||||
} else if (YouTube === false) {
|
} else if (YouTube === false) {
|
||||||
|
@ -55,7 +57,7 @@ import './Styles/Iconoir.css'
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="video-container" id={"zorn-player-" + PlayerName}>
|
<div class="video-container" id={"zorn-player-" + PlayerName}>
|
||||||
<video class="main-video" {VideoAttributes} disableremoteplayback src={YouTube ? YTVideo : Video} poster={Poster} preload="auto"></video>
|
<video class="main-video" {VideoAttributes} disableremoteplayback src={YouTube ? YTVideo : Video} poster={YouTube ? YTThumbnail : Poster} preload="auto"></video>
|
||||||
{Audio ? <audio class="main-audio"><source {AudioAttributes} src={YouTube ? YTAudio : Audio} type="audio/mp3"/></audio> : null }
|
{Audio ? <audio class="main-audio"><source {AudioAttributes} src={YouTube ? YTAudio : Audio} type="audio/mp3"/></audio> : null }
|
||||||
{Audio ? <Sync PlayerName={PlayerName}/> : null }
|
{Audio ? <Sync PlayerName={PlayerName}/> : null }
|
||||||
{Milieu ?
|
{Milieu ?
|
||||||
|
@ -69,6 +71,11 @@ import './Styles/Iconoir.css'
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
{BigPlayButton ?
|
||||||
|
<button class="big-present-button"><i class="iconoir-play-solid"></i></button>
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
{SettingsMenu ?
|
{SettingsMenu ?
|
||||||
<Controls ShowBackAndForward={ShowBackAndForward} PlayerName={PlayerName} Live={Live}>
|
<Controls ShowBackAndForward={ShowBackAndForward} PlayerName={PlayerName} Live={Live}>
|
||||||
<button id="open-zorn-settings-button" onclick="OpenZornMenu()"><i class="iconoir-settings"></i></button>
|
<button id="open-zorn-settings-button" onclick="OpenZornMenu()"><i class="iconoir-settings"></i></button>
|
||||||
|
@ -81,7 +88,7 @@ import './Styles/Iconoir.css'
|
||||||
:
|
:
|
||||||
<Controls ShowBackAndForward={ShowBackAndForward} PlayerName={PlayerName} Live={Live}/>
|
<Controls ShowBackAndForward={ShowBackAndForward} PlayerName={PlayerName} Live={Live}/>
|
||||||
}
|
}
|
||||||
<Controller PlayerName={PlayerName}/>
|
<Controller PlayerName={PlayerName} BigPlayButton={BigPlayButton}/>
|
||||||
<Seek PlayerName={PlayerName}/>
|
<Seek PlayerName={PlayerName}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue