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IACjB,IAAI3H,EAAUC,EAAE2H,GAAM/C,KAAK,UAC3B7E,EAAQe,OAASf,EAAQe,QAAUd,EAAE2H,GAAM/C,KAAK,QAChD7E,EAAQY,OAASZ,EAAQY,QAAUX,EAAE2H,GAAM/C,KAAK,UAChD/E,EAASC,YAAY6H,EAAK,GAAI5H,EAAQ,GAE1C,IAGA6M,kBAAkBC,MAAMC,UAAU,oDAAoD,SAAUC,EAAO/M,GACrG,MAAMgN,EAAUhN,EAAE+M,GAAOnK,KAAK,uBAC9BoK,EAAQ9J,KAAI,CAACwE,EAAOC,KAClBA,EAAO3H,EAAEgN,EAAQtF,IACjB,MAAM3H,EAAUC,EAAE2H,GAAM/C,KAAK,UAC7B7E,EAAQe,OAASf,EAAQe,QAAUd,EAAE2H,GAAM/C,KAAK,QAChD7E,EAAQY,OAASZ,EAAQY,QAAUX,EAAE2H,GAAM/C,KAAK,UAChD/E,EAASC,YAAY6H,EAAK,GAAI5H,EAAQ,GAE1C,IAGA6M,kBAAkBC,MAAMC,UAAU,oDAAoD,SAAUC,EAAO/M,GACrG,MAAMgN,EAAUhN,EAAE+M,GAAOnK,KAAK,yBAC9BoK,EAAQ9J,KAAI,CAACwE,EAAOC,KAClBA,EAAO3H,EAAEgN,EAAQtF,IACjB,MAAM3H,EAAUC,EAAE2H,GAAM/C,KAAK,YAAc,CAAC,EAC5C5E,EAAE2H,GAAMX,WAAW,gBACnBjH,EAAQe,OAASf,GAASe,QAAUd,EAAE2H,GAAM/C,KAAK,QACjD7E,EAAQY,OAASZ,GAASY,QAAUX,EAAE2H,GAAM/C,KAAK,UACjD/E,EAASC,YAAY6H,EAAK,GAAI5H,EAAQ,GAE1C,GACF,G","sources":["webpack://audio-player/../utils/toHHMMSS.js","webpack://audio-player/./src/js/player.js","webpack://audio-player/./src/js/player/single.js"],"sourcesContent":["const toHHMMSS = (time) => {\r\n var sec_num = parseInt(time, 10); // don't forget the second param\r\n var hours = Math.floor(sec_num / 3600);\r\n var minutes = Math.floor((sec_num - hours * 3600) / 60);\r\n var seconds = sec_num - hours * 3600 - minutes * 60;\r\n\r\n if (hours < 10) {\r\n hours = \"0\" + hours;\r\n }\r\n if (minutes < 10) {\r\n minutes = \"0\" + minutes;\r\n }\r\n if (seconds < 10) {\r\n seconds = \"0\" + seconds;\r\n }\r\n return minutes + \":\" + seconds;\r\n};\r\n\r\nexport default toHHMMSS;\r\n","import \"./../css/player.scss\";\r\nimport H5AP from \"./player/single\";\r\nconst H5AP_Obj = new H5AP();\r\n\r\n(function ($) {\r\n $(document).ready(function () {\r\n // if script not exists or extract\r\n const mainScript = document.getElementById(\"h5ap-player-js\");\r\n if (!mainScript && typeof h5apPlayer !== \"undefined\") {\r\n const ioScript = document.createElement(\"script\");\r\n ioScript.src = window?.h5apPlayer?.plyrio_js || false;\r\n ioScript.src && document.getElementsByTagName(\"head\")[0].appendChild(ioScript);\r\n\r\n var script = document.createElement(\"script\");\r\n script.src = window?.h5apPlayer?.plyr_js || false;\r\n script.src && document.getElementsByTagName(\"head\")[0].appendChild(script);\r\n }\r\n\r\n /**\r\n * for single video\r\n */\r\n const h5apAudios = document.querySelectorAll(\".h5ap_standard_player\");\r\n Object.keys(h5apAudios).map((item) => {\r\n const audioPlayer = $(h5apAudios[item])[0];\r\n let options = audioPlayer.dataset.options;\r\n options = options == \"{\" ? {} : JSON.parse(options);\r\n options.poster = options.poster ?? audioPlayer.dataset?.poster;\r\n options.source = options.source ?? audioPlayer.dataset?.song;\r\n options.skin = options.skin ?? audioPlayer.dataset?.skin;\r\n options.title = options.title ?? audioPlayer.dataset?.title;\r\n\r\n //remove attribute\r\n audioPlayer.removeAttribute(\"data-options\");\r\n audioPlayer.removeAttribute(\"data-song\");\r\n\r\n if (options) H5AP_Obj.audioPlayer(audioPlayer, options);\r\n });\r\n\r\n H5AP_Obj.stickyPlayer2($(\".h5ap_sticky_player\"));\r\n\r\n /**\r\n * for playlist\r\n */\r\n\r\n /**\r\n * for quick Player\r\n */\r\n const quickPlayers = document.querySelectorAll(\".h5ap_quick_player\");\r\n Object.keys(quickPlayers).map((item) => {\r\n const quickPlayer = $(quickPlayers[item]);\r\n H5AP_Obj.quickPlayer(quickPlayer);\r\n });\r\n\r\n // Single Play button\r\n });\r\n\r\n /**\r\n * This is for Elementor\r\n */\r\n $(window).on(\"elementor/frontend/init\", function () {\r\n //this is for Stamp Auudio Player\r\n elementorFrontend.hooks.addAction(\"frontend/element_ready/StampAudioPlayer.default\", function (scope, $) {\r\n const players = $(scope).find(\".stampAudioPlayer\");\r\n players.map((index, item) => {\r\n item = $(players[index]);\r\n let options = $(item).data(\"option\");\r\n options.source = options.source ?? $(item).data(\"song\");\r\n options.poster = options.poster ?? $(item).data(\"poster\");\r\n H5AP_Obj.audioPlayer(item[0], options);\r\n });\r\n });\r\n\r\n // this is form fusion player\r\n elementorFrontend.hooks.addAction(\"frontend/element_ready/FusionAudioPlayer.default\", function (scope, $) {\r\n const players = $(scope).find(\".h5ap_fusion_player\");\r\n players.map((index, item) => {\r\n item = $(players[index]);\r\n const options = $(item).data(\"option\");\r\n options.source = options.source ?? $(item).data(\"song\");\r\n options.poster = options.poster ?? $(item).data(\"poster\");\r\n H5AP_Obj.audioPlayer(item[0], options);\r\n });\r\n });\r\n\r\n //This is for simple audio player\r\n elementorFrontend.hooks.addAction(\"frontend/element_ready/SimpleAudioPlayer.default\", function (scope, $) {\r\n const players = $(scope).find(\".h5ap_standard_player\");\r\n players.map((index, item) => {\r\n item = $(players[index]);\r\n const options = $(item).data(\"options\") || {};\r\n $(item).removeAttr(\"data-options\");\r\n options.source = options?.source ?? $(item).data(\"song\");\r\n options.poster = options?.poster ?? $(item).data(\"poster\");\r\n H5AP_Obj.audioPlayer(item[0], options);\r\n });\r\n });\r\n });\r\n})(jQuery);\r\n","import toHHMMSS from \"../../../../utils/toHHMMSS\";\r\n\r\nclass H5AP {\r\n audioPlayer(audioPlayer, options) {\r\n const $ = jQuery;\r\n const otherControls = {\r\n repeat: true,\r\n };\r\n options.i18n = {};\r\n if (typeof h5ap_i18n != \"undefined\") {\r\n options.i18n = h5ap_i18n;\r\n }\r\n let { controls, seekTime, i18n, title, artist, disablePause, poster, muted, autoplay, source, skin, disableDownload, fusionDownload, color, background, repeat, primaryColor } = options;\r\n\r\n if (skin === \"default\" && disableDownload === false) {\r\n otherControls.download = true;\r\n }\r\n\r\n if (skin === \"fusion\" && fusionDownload === true) {\r\n otherControls.download = true;\r\n }\r\n\r\n //initialize skin\r\n if (skin === \"fusion\") {\r\n controls = this.skinFusion(poster, title, source, otherControls);\r\n }\r\n\r\n if (skin === \"wave\") {\r\n controls = this.skinWave(poster, title, artist, background, color);\r\n }\r\n\r\n if (skin === \"card-1\") {\r\n controls = this.skinCardOne({ title, artist });\r\n }\r\n if (skin === \"card-2\") {\r\n controls = this.skinCardTwo({ title, artist, poster });\r\n }\r\n\r\n if (skin === \"simple-1\") {\r\n controls = this.skinSimpleOne({ title, artist });\r\n }\r\n if (skin === \"simple-2\") {\r\n controls = this.skinSimpleTwo({ title, artist, poster });\r\n }\r\n\r\n if (skin === \"stamp\") {\r\n controls = this.skinStamp();\r\n }\r\n\r\n //remove focus\r\n $(\".skin_default .plyr__control\").on(\"focus\", function () {\r\n setTimeout(() => {\r\n this.blur();\r\n }, 1000);\r\n });\r\n\r\n let plyr = localStorage.getItem(\"plyr\");\r\n // const isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);\r\n const isFirefox = typeof InstallTrigger !== \"undefined\";\r\n if (autoplay && plyr && isFirefox) {\r\n plyr = JSON.parse(plyr);\r\n plyr.muted = true;\r\n localStorage.setItem(\"plyr\", JSON.stringify(plyr));\r\n } else if (plyr) {\r\n plyr = JSON.parse(plyr);\r\n plyr.muted = false;\r\n localStorage.setItem(\"plyr\", JSON.stringify(plyr));\r\n }\r\n\r\n //initilize player\r\n const player = new Plyr($(audioPlayer).find(\"audio\"), {\r\n controls,\r\n i18n,\r\n seekTime,\r\n loop: {\r\n active: repeat,\r\n },\r\n muted,\r\n autoplay,\r\n speed: { selected: 1, options: h5apPlayer?.speed.map(Number) },\r\n });\r\n\r\n if (skin != \"default\") {\r\n player.speed = 1;\r\n }\r\n\r\n if (autoplay) {\r\n player.play();\r\n }\r\n\r\n if (skin === \"wave\" && player) {\r\n this.wave(audioPlayer, player, primaryColor, background);\r\n }\r\n\r\n if (skin === \"card-1\" && player) {\r\n this.cardOne(audioPlayer, player, poster);\r\n }\r\n if (skin === \"card-2\" && player) {\r\n this.cardTwo(audioPlayer, player, poster);\r\n }\r\n\r\n if (disablePause) {\r\n this.disablePause(player);\r\n }\r\n\r\n //apply stamp player style\r\n if (options.skin === \"stamp\" && color != \"\") {\r\n $(audioPlayer).find(\".StampAudioPlayerSkin button svg\").css(\"fill\", color);\r\n $(audioPlayer).find(\".StampAudioPlayerSkin .extraOptions .audioTitle\").css(\"color\", color);\r\n $(audioPlayer).find(\".StampAudioPlayerSkin .mainOptions .controls .audioProgressView .progressWrap .currentTime\").css(\"color\", color);\r\n $(audioPlayer).find(\".StampAudioPlayerSkin .mainOptions .controls .audioProgressView .progressWrap .totalTime\").css(\"color\", color);\r\n $(audioPlayer).find(\".StampAudioPlayerSkin .mainOptions .controls .playPauseAudio\").css(\"border-color\", color);\r\n $(audioPlayer).find(\".audioTitle\").text(title);\r\n }\r\n\r\n // responsive design if container width less than 500px\r\n if ($(audioPlayer).width() < 500 && skin === \"fusion\") {\r\n $(audioPlayer).addClass(\"skinFusionMobile\");\r\n }\r\n\r\n // disable other player when playing this audio\r\n if (!h5apPlayer?.multipleAudio) {\r\n $(audioPlayer)\r\n .find('.plyr__control[data-plyr=\"play\"]')\r\n .on(\"click\", () => {\r\n if (player.playing) {\r\n this.disableOtherPlayer(player, true);\r\n }\r\n });\r\n }\r\n\r\n //dynamic repeat button\r\n $(audioPlayer)\r\n .find('[data-plyr=\"repeat\"]')\r\n .on(\"click\", function () {\r\n $(this).attr(\"data-active\", $(this).attr(\"data-active\") === \"true\" ? \"false\" : \"true\");\r\n });\r\n if (repeat === true) {\r\n $(audioPlayer).find('[data-plyr=\"repeat\"]').attr(\"data-active\", \"true\");\r\n }\r\n\r\n player.on(\"ended\", function () {\r\n const repeat = $(audioPlayer).find('[data-plyr=\"repeat\"]').attr(\"data-active\");\r\n if (repeat === \"true\") {\r\n player.play();\r\n }\r\n });\r\n\r\n //dynamic repeat button for playlist\r\n $(audioPlayer)\r\n .find('[data-plyr=\"playlist\"]')\r\n .on(\"click\", function () {\r\n $(this).attr(\"data-active\", $(this).attr(\"data-active\") === \"true\" ? \"false\" : \"true\");\r\n });\r\n\r\n // update source if audio is not playing (soundcloud)\r\n let intervalId = null;\r\n player.on(\"ready\", function () {\r\n if (player.source?.includes(\"soundcloud\")) {\r\n player.speed = 1;\r\n if (intervalId) {\r\n clearInterval(intervalId);\r\n }\r\n intervalId = setInterval(() => {\r\n if (!player.playing) {\r\n let tempSource = source;\r\n if (source.includes(\"?\")) {\r\n tempSource = source + `&_${parseInt(Math.random(255) * 100)}`;\r\n } else {\r\n tempSource = source + `?_${parseInt(Math.random(255) * 100)}`;\r\n }\r\n\r\n player.source = {\r\n type: \"audio\",\r\n title: \"Audio File\",\r\n sources: [\r\n {\r\n src: tempSource,\r\n type: \"audio/mp3\",\r\n },\r\n ],\r\n };\r\n }\r\n }, 60 * 3 * 1000);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n *\r\n * @param {*} selector\r\n * @param {*} options\r\n */\r\n quickPlayer(quickPlayer) {\r\n const $ = jQuery;\r\n const options = $(quickPlayer).data(\"options\");\r\n options.i18n = {};\r\n if (typeof h5ap_i18n != \"undefined\") {\r\n options.i18n = h5ap_i18n;\r\n }\r\n const { seekTime, controls, i18n } = options;\r\n const player = new Plyr($(quickPlayer).find(\"audio\"), {\r\n controls,\r\n i18n,\r\n seekTime,\r\n speed: { selected: 1, options: h5apPlayer?.speed.map(Number) },\r\n });\r\n\r\n //pause other player if this player is playing\r\n if (!h5apPlayer?.multipleAudio) {\r\n $(quickPlayer)\r\n .find('.plyr__control[data-plyr=\"play\"]')\r\n .on(\"click\", () => {\r\n if (player.playing) {\r\n this.disableOtherPlayer(player, true);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {String} stickyPlayer\r\n */\r\n stickyPlayer(stickyPlayer) {\r\n const $ = jQuery;\r\n const btnClose = $(stickyPlayer).find(\".icon-no-alt\");\r\n const btnMinimize = $(stickyPlayer).find(\".icon-minus\");\r\n const btnMaximize = $(stickyPlayer).find(\".icon-plus\");\r\n const poster = $(stickyPlayer).data(\"poster\");\r\n const source = $(stickyPlayer).data(\"source\");\r\n const title = $(stickyPlayer).data(\"title\");\r\n const options = $(stickyPlayer).data(\"options\");\r\n const { initialVolume, skin, background } = options;\r\n const otherControls = {};\r\n\r\n if (options?.stickyDownload === true) {\r\n otherControls.download = true;\r\n }\r\n if (options?.repeat === true) {\r\n otherControls.repeat = true;\r\n }\r\n\r\n $(window).on(\"scroll\", function () {\r\n if (window.pageYOffset > 300) {\r\n $(stickyPlayer).fadeIn();\r\n }\r\n });\r\n\r\n //get player screen\r\n let controls = \"\";\r\n if (skin === \"simple\") {\r\n controls = this.skinSimple(title, poster, background);\r\n } else {\r\n controls = this.skinFusion(poster, title, source, otherControls);\r\n }\r\n\r\n let storage = localStorage.getItem(\"h5apStickyplaying\");\r\n let option = { controls };\r\n if (options?.remember && storage != \"false\") {\r\n let plyr = localStorage.getItem(\"plyr\");\r\n // if (autoplay && plyr) {\r\n // plyr = JSON.parse(plyr);\r\n // plyr.volume = 0;\r\n // plyr.muted = true;\r\n // localStorage.setItem(\"plyr\", JSON.stringify(plyr));\r\n // } else if (plyr) {\r\n plyr = JSON.parse(plyr);\r\n plyr.volume = 0;\r\n plyr.muted = true;\r\n localStorage.setItem(\"plyr\", JSON.stringify(plyr));\r\n // }\r\n }\r\n\r\n const player = new Plyr($(stickyPlayer).find(\"audio\"), option);\r\n\r\n player.speed = 1;\r\n\r\n if (storage != \"false\") {\r\n storage = JSON.parse(storage);\r\n setTimeout(() => {\r\n player.volume = 0.5;\r\n player.currentTime = storage?.time;\r\n }, 100);\r\n player.play();\r\n }\r\n\r\n // setTimeout(() => {\r\n // player.play();\r\n // }, 2000);\r\n\r\n // disable other player when playing this audio\r\n if (!h5apPlayer?.multipleAudio) {\r\n $(stickyPlayer)\r\n .find('.plyr__control[data-plyr=\"play\"]')\r\n .on(\"click\", () => {\r\n if (player.playing) {\r\n this.disableOtherPlayer(player, true);\r\n }\r\n });\r\n }\r\n\r\n //close player\r\n btnClose.on(\"click\", function () {\r\n $(stickyPlayer).fadeOut();\r\n $(stickyPlayer).remove();\r\n player.stop();\r\n });\r\n\r\n // minimize player\r\n btnMinimize.on(\"click\", function () {\r\n $(stickyPlayer).addClass(\"minimized\");\r\n $(stickyPlayer).removeClass(\"maximized\");\r\n });\r\n\r\n btnMaximize.on(\"click\", function () {\r\n $(stickyPlayer).addClass(\"maximized\");\r\n $(stickyPlayer).removeClass(\"minimized\");\r\n });\r\n\r\n //set initial volume\r\n player.volume = initialVolume / 100;\r\n\r\n $(stickyPlayer)\r\n .find('[data-plyr=\"repeat\"]')\r\n .on(\"click\", function () {\r\n $(this).attr(\"data-active\", $(this).attr(\"data-active\") === \"true\" ? \"false\" : \"true\");\r\n });\r\n if (options?.repeat === true) {\r\n $(stickyPlayer).find('[data-plyr=\"repeat\"]').attr(\"data-active\", \"true\");\r\n }\r\n player.on(\"ended\", function () {\r\n const repeat = $(stickyPlayer).find('[data-plyr=\"repeat\"]').attr(\"data-active\");\r\n if (repeat === \"true\") {\r\n player.play();\r\n }\r\n });\r\n\r\n // player.on(\"pause\", function () {\r\n // console.log(\"source\", player.source);\r\n // console.log(\"md5\", MD5(decodeURI(player.source)).toString());\r\n // });\r\n\r\n // set cookie if there\r\n window.onbeforeunload = (event) => {\r\n // const e = event || window.event;\r\n // e.preventDefault();\r\n if (player.playing) {\r\n const object = { time: player.currentTime };\r\n if (stickyPlayer[0]) {\r\n object.html = controls;\r\n object.source = player.source;\r\n }\r\n localStorage.setItem(\"h5apStickyplaying\", JSON.stringify(object));\r\n } else {\r\n localStorage.setItem(\"h5apStickyplaying\", false);\r\n }\r\n };\r\n\r\n // if (!source) {\r\n // const downloadBtn = $(stickyPlayer).find(\".plyr__download\");\r\n // downloadBtn.hide();\r\n // }\r\n }\r\n\r\n /**\r\n *\r\n * @param {String} stickyPlayer\r\n */\r\n stickyPlayer2(stickyPlayer, optionss = false, infoss = false) {\r\n const detector = this.getDetectorData(stickyPlayer, { options: optionss, infos: infoss, initializer: \"stickyPlayer2\" });\r\n if (!detector) return false;\r\n const { wrapper, options } = detector;\r\n\r\n const $ = jQuery;\r\n const btnClose = $(wrapper).find(\".icon-no-alt\");\r\n const btnMinimize = $(wrapper).find(\".icon-minus\");\r\n const btnMaximize = $(wrapper).find(\".icon-plus\");\r\n const poster = $(wrapper).data(\"poster\");\r\n const source = $(wrapper).data(\"source\");\r\n const title = $(wrapper).data(\"title\");\r\n // const options = $(stickyPlayer).data(\"options\");\r\n const { initialVolume, skin, background } = options;\r\n const otherControls = {};\r\n\r\n // remove attributes\r\n $(wrapper).removeAttr(\"data-poster\");\r\n $(wrapper).removeAttr(\"data-source\");\r\n $(wrapper).removeAttr(\"data-title\");\r\n $(wrapper).removeAttr(\"data-options\");\r\n\r\n if (options?.stickyDownload === true) {\r\n otherControls.download = true;\r\n }\r\n if (options?.repeat === true) {\r\n otherControls.repeat = true;\r\n }\r\n\r\n $(window).on(\"scroll\", function () {\r\n if (window.pageYOffset > 300) {\r\n $(wrapper).fadeIn();\r\n }\r\n });\r\n\r\n //get player screen\r\n let controls = \"\";\r\n if (skin === \"simple\") {\r\n controls = this.skinSimple(title, poster, background);\r\n } else {\r\n controls = this.skinFusion(poster, title, source, otherControls);\r\n }\r\n\r\n let storage = localStorage.getItem(\"h5apStickyplaying\");\r\n let option = { controls };\r\n if (options?.remember && storage != \"false\") {\r\n let plyr = localStorage.getItem(\"plyr\") || \"{}\";\r\n plyr = JSON.parse(plyr);\r\n plyr.volume = 0;\r\n plyr.muted = true;\r\n localStorage.setItem(\"plyr\", JSON.stringify(plyr));\r\n }\r\n\r\n const player = new Plyr($(wrapper).find(\"audio\"), option);\r\n\r\n if (storage != \"false\") {\r\n storage = JSON.parse(storage);\r\n setTimeout(() => {\r\n player.volume = 0.5;\r\n player.currentTime = storage?.time;\r\n }, 100);\r\n player.play();\r\n }\r\n\r\n // setTimeout(() => {\r\n // player.play();\r\n // }, 2000);\r\n\r\n // disable other player when playing this audio\r\n if (!h5apPlayer?.multipleAudio) {\r\n $(wrapper)\r\n .find('.plyr__control[data-plyr=\"play\"]')\r\n .on(\"click\", () => {\r\n if (player.playing) {\r\n this.disableOtherPlayer(player, true);\r\n }\r\n });\r\n }\r\n\r\n //close player\r\n btnClose.on(\"click\", function () {\r\n $(wrapper).fadeOut();\r\n $(wrapper).remove();\r\n player.stop();\r\n });\r\n\r\n // minimize player\r\n btnMinimize.on(\"click\", function () {\r\n $(wrapper).addClass(\"minimized\");\r\n $(wrapper).removeClass(\"maximized\");\r\n });\r\n\r\n btnMaximize.on(\"click\", function () {\r\n $(wrapper).addClass(\"maximized\");\r\n $(wrapper).removeClass(\"minimized\");\r\n });\r\n\r\n //set initial volume\r\n player.volume = initialVolume / 100;\r\n\r\n $(wrapper)\r\n .find('[data-plyr=\"repeat\"]')\r\n .on(\"click\", function () {\r\n $(this).attr(\"data-active\", $(this).attr(\"data-active\") === \"true\" ? \"false\" : \"true\");\r\n });\r\n if (options?.repeat === true) {\r\n $(wrapper).find('[data-plyr=\"repeat\"]').attr(\"data-active\", \"true\");\r\n }\r\n\r\n player.on(\"ended\", function () {\r\n const repeat = $(wrapper).find('[data-plyr=\"repeat\"]').attr(\"data-active\");\r\n if (repeat === \"true\") {\r\n player.play();\r\n }\r\n });\r\n\r\n //draggble\r\n // new Dragable(wrapper, {\r\n // setPosition: false,\r\n // useGPU: false,\r\n // onDrag: (element) => {\r\n // if (element) {\r\n // element.style.bottom = \"100%\";\r\n // }\r\n // },\r\n // handle: $(wrapper).find(\".rewind_play_fastforward\")[0],\r\n // });\r\n // $(wrapper).find(\".rewind_play_fastforward\").css(\"cursor\", \"move\");\r\n }\r\n\r\n /**\r\n *\r\n * @param {*} player\r\n */\r\n disableOtherPlayer(player, play = true) {\r\n const $ = jQuery;\r\n const players = $(\"audio\");\r\n players.each(function () {\r\n $(this)[0].pause();\r\n });\r\n\r\n if (play) {\r\n player?.play();\r\n } else {\r\n player?.pause();\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {String} poster\r\n * @param {String} title\r\n * @param {URL} source\r\n * @param {Object} otherControls\r\n * @returns Fusion Skin\r\n */\r\n skinFusion(poster = null, title = null, source = null, otherControls = { download: false }) {\r\n const download =\r\n otherControls?.download === true\r\n ? `\r\n \r\n Download\r\n `\r\n : \"\";\r\n const repeat =\r\n otherControls?.repeat === true\r\n ? ``\r\n : \"\";\r\n const playlist = otherControls?.playlist === true ? `` : \"\";\r\n return `