dont load funscript player for non-supporters
This commit is contained in:
parent
bdc4894e3e
commit
c169405bfe
@ -11,23 +11,23 @@ window.download = download
|
||||
window.HELP_IMPROVE_VIDEOJS = false; // disable videojs tracking
|
||||
|
||||
|
||||
|
||||
const container = document.querySelector('.video-container')
|
||||
const isSupporter = container.dataset.supporter === 'true'
|
||||
const player = videojs('player');
|
||||
|
||||
player.ready(() => {
|
||||
if (isSupporter) {
|
||||
// set up plugins
|
||||
const funscripts = collectFunscripts()
|
||||
const funscriptsOptions = {
|
||||
buttplugClientName: "future.porn",
|
||||
debug: false,
|
||||
funscripts,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// set up plugins
|
||||
const funscripts = collectFunscripts()
|
||||
const funscriptsOptions = {
|
||||
buttplugClientName: "future.porn",
|
||||
debug: false,
|
||||
funscripts,
|
||||
player.funscriptPlayer(funscriptsOptions);
|
||||
}
|
||||
|
||||
player.funscriptPlayer(funscriptsOptions);
|
||||
|
||||
|
||||
player.hlsQualitySelector({
|
||||
displayCurrentQuality: true,
|
||||
|
@ -42,7 +42,7 @@
|
||||
<div class="section" x-data="{}">
|
||||
<section>
|
||||
{{#if vod.hlsPlaylist}}
|
||||
<div class="video-container">
|
||||
<div class="video-container" data-supporter="{{hasRole 'supporterTier1' user}}">
|
||||
<video id="player" class="video-js vjs-fluid" controls preload="auto" poster="{{getCdnUrl vod.thumbnail}}"
|
||||
data-setup='{}' data-playlist="{{signedHlsUrl vod.hlsPlaylist}}">
|
||||
<source src="/hls/{{vod.id}}/master.m3u8" type="application/x-mpegURL">
|
||||
@ -469,8 +469,6 @@ Script 4: Initialize the buttplug plugin and pass in the funscript URL from the
|
||||
|
||||
</script> --}}
|
||||
|
||||
|
||||
<script type="module" src="/assets/vod.js"></script>
|
||||
|
||||
|
||||
{{/main}}
|
Loading…
x
Reference in New Issue
Block a user