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
|
window.HELP_IMPROVE_VIDEOJS = false; // disable videojs tracking
|
||||||
|
|
||||||
|
|
||||||
|
const container = document.querySelector('.video-container')
|
||||||
|
const isSupporter = container.dataset.supporter === 'true'
|
||||||
const player = videojs('player');
|
const player = videojs('player');
|
||||||
|
|
||||||
player.ready(() => {
|
player.ready(() => {
|
||||||
|
if (isSupporter) {
|
||||||
|
// set up plugins
|
||||||
|
const funscripts = collectFunscripts()
|
||||||
|
const funscriptsOptions = {
|
||||||
|
buttplugClientName: "future.porn",
|
||||||
|
debug: false,
|
||||||
|
funscripts,
|
||||||
|
}
|
||||||
|
|
||||||
|
player.funscriptPlayer(funscriptsOptions);
|
||||||
|
|
||||||
// set up plugins
|
|
||||||
const funscripts = collectFunscripts()
|
|
||||||
const funscriptsOptions = {
|
|
||||||
buttplugClientName: "future.porn",
|
|
||||||
debug: false,
|
|
||||||
funscripts,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
player.funscriptPlayer(funscriptsOptions);
|
|
||||||
|
|
||||||
|
|
||||||
player.hlsQualitySelector({
|
player.hlsQualitySelector({
|
||||||
displayCurrentQuality: true,
|
displayCurrentQuality: true,
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<div class="section" x-data="{}">
|
<div class="section" x-data="{}">
|
||||||
<section>
|
<section>
|
||||||
{{#if vod.hlsPlaylist}}
|
{{#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}}"
|
<video id="player" class="video-js vjs-fluid" controls preload="auto" poster="{{getCdnUrl vod.thumbnail}}"
|
||||||
data-setup='{}' data-playlist="{{signedHlsUrl vod.hlsPlaylist}}">
|
data-setup='{}' data-playlist="{{signedHlsUrl vod.hlsPlaylist}}">
|
||||||
<source src="/hls/{{vod.id}}/master.m3u8" type="application/x-mpegURL">
|
<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> --}}
|
||||||
|
|
||||||
|
|
||||||
<script type="module" src="/assets/vod.js"></script>
|
<script type="module" src="/assets/vod.js"></script>
|
||||||
|
|
||||||
|
|
||||||
{{/main}}
|
{{/main}}
|
Loading…
x
Reference in New Issue
Block a user