// Module ID: 14735 // Function ID: 14736 // Name: PLAYER_FUNCTIONS // Dependencies: [7990, 14736, 14731] // Exports: MAIN_SCRIPT // Module 14735 (PLAYER_FUNCTIONS) import module_7990 from "module_7990"; import _defineProperty from "_defineProperty"; let obj = { muteVideo: "player.mute(); true;", unMuteVideo: "player.unMute(); true;", playVideo: "player.playVideo(); true;", pauseVideo: "player.pauseVideo(); true;", getVideoUrlScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'getVideoUrl', data: player.getVideoUrl()}));\ntrue;\n ", durationScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'getDuration', data: player.getDuration()}));\ntrue;\n", currentTimeScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'getCurrentTime', data: player.getCurrentTime()}));\ntrue;\n", isMutedScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'isMuted', data: player.isMuted()}));\ntrue;\n", getVolumeScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'getVolume', data: player.getVolume()}));\ntrue;\n", getPlaybackRateScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'getPlaybackRate', data: player.getPlaybackRate()}));\ntrue;\n", getAvailablePlaybackRatesScript: "\nwindow.ReactNativeWebView.postMessage(JSON.stringify({eventType: 'getAvailablePlaybackRates', data: player.getAvailablePlaybackRates()}));\ntrue;\n", setVolume(arg0) { return "player.setVolume(" + arg0 + "); true;"; }, seekToScript(arg0, arg1) { return "player.seekTo(" + arg0 + ", " + arg1 + "); true;"; }, setPlaybackRate(arg0) { return "player.setPlaybackRate(" + arg0 + "); true;"; }, loadPlaylist(playList, arg1, closure_2) { let num = arg1; if (!arg1) { num = 0; } let str = "cuePlaylist"; if (closure_2) { str = "loadPlaylist"; } let str2 = "undefined"; let str3 = "undefined"; if (typeof playList === "string") { str3 = `${"\"" + playList}"`; } let str4 = str2; if (typeof playList === "string") { str4 = "\"undefined\""; } if (Array.isArray(playList)) { str2 = `${"\"" + playList.join(",")}"`; } return "player." + str + "({listType: " + str4 + ", list: " + str3 + ", playlist: " + str2 + ", index: " + num + "}); true;"; }, loadVideoById(videoId, closure_2) { let str = "cueVideoById"; if (closure_2) { str = "loadVideoById"; } const combined = "player." + str + "({videoId: "; return combined + JSON.stringify(videoId) + "}); true;"; } }; obj = {}; _defineProperty.default(obj, require("module_14731").PLAY_MODE, obj.playVideo); _defineProperty.default(obj, require("module_14731").PAUSE_MODE, obj.pauseVideo); const obj1 = {}; _defineProperty.default(obj1, require("module_14731").MUTE_MODE, obj.muteVideo); _defineProperty.default(obj1, require("module_14731").UNMUTE_MODE, obj.unMuteVideo); export const PLAYER_FUNCTIONS = obj; export const playMode = obj; export const soundMode = obj1; export const MAIN_SCRIPT = function MAIN_SCRIPT(current, current2, current3, closure_12, num) { let cc_lang_pref; let color; let controls; let end; let iv_load_policy; let loop; let playerLang; let start; ({ end, color, start, playerLang, loop } = current3); let tmp = undefined !== loop; if (tmp) { tmp = loop; } ({ cc_lang_pref, iv_load_policy, controls } = current3); let tmp2 = undefined === controls; if (!tmp2) { tmp2 = controls; } const preventFullScreen = current3.preventFullScreen; num = 0; if (current3.rel) { num = 1; } let num2 = 0; if (tmp) { num2 = 1; } let str = current; if (!current) { str = ""; } let num3 = 0; if (tmp2) { num3 = 1; } if (!cc_lang_pref) { cc_lang_pref = ""; } let num4 = 0; if (current3.modestbranding) { num4 = 1; } let num5 = 1; let num6 = 1; if (undefined !== preventFullScreen) { num6 = num5; if (preventFullScreen) { num6 = 0; } } let num7 = 0; if (current3.showClosedCaptions) { num7 = num5; } if (typeof num === "number") { num5 = num; } let tmp3; if (typeof current2 === "string") { tmp3 = current2; } let str2; if (typeof current2 === "string") { str2 = "playlist"; } const text = `initial-scale=${num5}`; let text1 = text; if (!closure_12) { text1 = `initial-scale=${num5}${", maximum-scale=" + num5}`; } let obj = { end, list: tmp3, start, color, rel_s: num, loop_s: num2, listType: str2, playlist: null, videoId_s: null, controls_s: null, playerLang: null, iv_load_policy: null, contentScale_s: null, cc_lang_pref_s: null, allowWebViewZoom: null, modestbranding_s: null, preventFullScreen_s: null, showClosedCaptions_s: null }; let joined; if (Array.isArray(current2)) { joined = current2.join(","); } obj[7] = joined; obj[8] = str; obj[9] = num3; obj[10] = playerLang; obj[11] = iv_load_policy; obj[12] = num5; obj[13] = cc_lang_pref; obj[14] = closure_12; obj[15] = num4; obj[16] = num6; obj[17] = num7; const sum = "\n\n\n \n \n \n \n \n
\n
\n
\n\n `, urlEncodedJSON: encodeURI(JSON.stringify(obj)) }; return obj; };