PageSourceSearch

https://bajao.pk/theme/js/plugins/mediaelement/player.js

js bajao.pk collected 2026-09-24 13:19:35 UTC 106,398 bytes, 1,308 lines download raw bytes

1var _playedContent,
2        trackTitle,
3        trackAlbum,
4        playingDiv,
5        mediaStream,
6        get_playable_song,
7        trackId = 0,
8        playCurrentSong = !1,
9        playerClosed = !1,
10        messageShown = !1,
11        isPopupShown = !1,
12        repeatCoutner = !1,
13        isBannerClicked = !1,
14        currentBBCTrackerId = null,
15        bbcLastPauseTime = 0;
16!(function (e) {
17    "function" == typeof define && define.amd ? define(["jquery"], e) : e("object" == typeof exports ? require("jquery") : jQuery);
18})(function (e) {
19    var t = /\+/g;
20    function a(e) {
21        return s.raw ? e : encodeURIComponent(e);
22    }
23    function i(e) {
24        return s.raw ? e : decodeURIComponent(e);
25    }
26    function n(a, i) {
27        var n = s.raw
28                ? a
29                : (function e(a) {
30                    0 === a.indexOf('"') && (a = a.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
31                    try {
32                        return (a = decodeURIComponent(a.replace(t, " "))), s.json ? JSON.parse(a) : a;
33                    } catch (i) {
34                    }
35                })(a);
36        return e.isFunction(i) ? i(n) : n;
37    }
38    var s = (e.cookie = function (t, o, l) {
39        if (arguments.length > 1 && !e.isFunction(o)) {
40            if ("number" == typeof (l = e.extend({}, s.defaults, l)).expires) {
41                var r,
42                        d = l.expires,
43                        c = (l.expires = new Date());
44                c.setTime(+c + 864e5 * d);
45            }
46            return (document.cookie = [
47                a(t),
48                "=",
49                ((r = o), a(s.json ? JSON.stringify(r) : String(r))),
50                l.expires ? "; expires=" + l.expires.toUTCString() : "",
51                l.path ? "; path=" + l.path : "",
52                l.domain ? "; domain=" + l.domain : "",
53                l.secure ? "; secure" : "",
54            ].join(""));
55        }
56        for (var p = t ? void 0 : {}, u = document.cookie ? document.cookie.split("; ") : [], y = 0, m = u.length; y < m; y++) {
57            var g = u[y].split("="),
58                    f = i(g.shift()),
59                    v = g.join("=");
60            if (t && t === f) {
61                p = n(v, o);
62                break;
63            }
64            t || void 0 === (v = n(v)) || (p[f] = v);
65        }
66        return p;
67    });
68    (s.defaults = {}),
69            (e.removeCookie = function (t, a) {
70                return void 0 !== e.cookie(t) && (e.cookie(t, "", e.extend({}, a, {expires: -1})), !e.cookie(t));
71            });
72}),
73        (function (e) {
74            "use strict";
75            e(document).ready(function () {
76                try {
77                    "song" == getPathVariableByIndex(1) &&
78                            ((playCurrentSong = !0),
79                                    setTimeout(function () {
80                                        getParameterByName("clickcode") &&
81                                                isMobile &&
82                                                contentToStream &&
83                                                (e(".contro-close-player").hide(),
84                                                        e(".footer-player").addClass("top-fixed"),
85                                                        e(".top-fixed")
86                                                        .fadeIn()
87                                                        .css({top: 500})
88                                                        .animate({top: 0}, 50, function () {}),
89                                                        e(".contro-down-player").removeClass("contro_show").addClass("contro_hide"),
90                                                        e(".contro-up-player").removeClass("contro_hide").addClass("contro_show"));
91                                    }, 200));
92                } catch (t) {
93                }
94                if (
95                        (e(document).on("click", ".contro-close-player", function () {
96                            s(), (playerClosed = !0), e(".footer-player").hide(), e(".supportfix").css("bottom", "60px"), (trackId = 0);
97                        }),
98                                e(document).on("click", ".contro-down-player", function () {
99                            e(".footer-player").removeClass("contro-play"),
100                                    e("body").addClass("no_padding"),
101                                    e(this).addClass("contro_hide"),
102                                    e(".contro-up-player").addClass("contro_show"),
103                                    isMobile && contentToStream
104                                    ? (e(".contro-close-player").hide(),
105                                            e(".footer-player").addClass("top-fixed"),
106                                            e(".top-fixed")
107                                            .fadeIn()
108                                            .css({top: 500})
109                                            .animate({top: 0}, 50, function () {}),
110                                            e(".contro-down-player").removeClass("contro_show").addClass("contro_hide"),
111                                            e(".contro-up-player").removeClass("contro_hide").addClass("contro_show"))
112                                    : e(".supportfix").css("bottom", "130px");
113                        }),
114                                e(document).on("click", ".contro-up-player", function () {
115                            e(".footer-player").addClass("contro-play"),
116                                    e("body").removeClass("no_padding"),
117                                    e(".contro-down-player").removeClass("contro_hide"),
118                                    e(this).removeClass("contro_show"),
119                                    isMobile && contentToStream
120                                    ? (e(".contro-close-player").show(),
121                                            e(".footer-player").css("top", "auto"),
122                                            e(".top-fixed").css("background-image", "none"),
123                                            e(".footer-player").removeClass("top-fixed").removeClass("banner-wrap-on").removeClass("artist-banner"),
124                                            e(".contro-up-player").addClass("contro_hide"),
125                                            e(".contro-down-player").addClass("contro_show"))
126                                    : e(".supportfix").css("bottom", "60px");
127                        }),
128                                "yes" == e.cookie("check-contro-class2"))
129                        )
130                    e("body").addClass("no_padding"), e(".contro-down-player").addClass("contro_hide"), e(".contro-up-player").addClass("contro_show");
131                else {
132                    var a = e(".footer-player");
133                    a.removeClass("contro-play"), e("body").removeClass("no_padding"), e(".contro-down-player").removeClass("contro_hide"), e(".contro-up-player").removeClass("contro_show"), a.addClass("contro-play");
134                }
135                var i = function (t) {
136                    var a = !0,
137                            i = [],
138                            n = [];
139                    e.cookie("playlist-content") && (n = e.parseJSON(e.cookie("playlist-content"))),
140                            e.cookie("noo-playlist") && (i = e.parseJSON(e.cookie("noo-playlist"))),
141                            n.forEach(function (e) {
142                                e.contentId === t.contentId && (a = !1);
143                            }),
144                            a && (n.push(t), e.cookie("playlist-content", JSON.stringify(n), {expires: 3600, path: "/"})),
145                            -1 == e.inArray(t.contentId, i) && (i.push(t.contentId), e.cookie("noo-playlist", JSON.stringify(i), {expires: 3600, path: "/"}));
146                },
147                        n = function (t) {
148                            var a = [],
149                                    a = [];
150                            e.cookie("noo-playlist") && (a = e.parseJSON(e.cookie("noo-playlist")));
151                            var i = e.inArray(parseInt(t), a);
152                            i > -1 && a.splice(i, 1), e.cookie("noo-playlist", JSON.stringify(a), {expires: 3600, path: "/"});
153                            var n = [];
154                            if ((e.cookie("playlist-content") && (n = e.parseJSON(e.cookie("playlist-content"))), n.length > 0)) {
155                                for (var s = 0, o = 0; o < n.length; o++)
156                                    n[o].contentId === t && (s = o);
157                                n.splice(s, 1), e.cookie("playlist-content", JSON.stringify(n), {expires: 3600, path: "/"});
158                            }
159                        },
160                        s = function () {
161                            m(), e(".footer-player").find("li.album-playlist-item").remove(), e.removeCookie("noo-playlist", {path: "/"}), e.removeCookie("playing-data", {path: "/"});
162
163                            // BBC Tracking: Clean up tracker when player is closed
164                            try {
165                                if (window.BBCTracking && currentBBCTrackerId) {
166                                    window.BBCTracking.removeBBCTracker(currentBBCTrackerId);
167                                    currentBBCTrackerId = null;
168                                }
169                            } catch (bbcErr) {
170                                console.error('[BBC Tracking] Error cleaning up tracker:', bbcErr);
171                            }
172                        },
173                        o = function (t) {
174                            var a = [];
175                            if ((e.cookie("noo-playlist") && (a = e.parseJSON(e.cookie("noo-playlist"))), e.inArray(parseInt(t), a) > -1)) {
176                                if (e.cookie("playing-data")) {
177                                    var i = e.parseJSON(e.cookie("playing-data"));
178                                    if (!e.cookie("playing-data") || i.song != t) {
179                                        var n = {song: t, time: 0, status: !1};
180                                        e.cookie("playing-data", JSON.stringify(n), {expires: 3600, path: "/"});
181                                    }
182                                } else {
183                                    var n = {song: t, time: 0, status: !1};
184                                    e.cookie("playing-data", JSON.stringify(n), {expires: 3600, path: "/"});
185                                }
186                            }
187                        },
188                        l = function (t) {
189                            if (e.cookie("noo-playlist") && e.cookie("playing-data")) {
190                                var a = e.parseJSON(e.cookie("playing-data"));
191                                (a.time = t), e.cookie("playing-data", JSON.stringify(a), {expires: 3600, path: "/"});
192                            }
193                        },
194                        r = function (t) {
195                            if (e.cookie("noo-playlist") && e.cookie("playing-data")) {
196                                var a = e.parseJSON(e.cookie("playing-data"));
197                                (a.status = t), e.cookie("playing-data", JSON.stringify(a), {expires: 3600, path: "/"});
198                            }
199                        };
200                get_playable_song = function (t, a) {
201                    e.ajax({type: "POST", data: "vdoId=" + t + "&quality=32", url: "/api/content/stream?siteid=" + getParameterByName("siteid"), dataType: "json"})
202                            .done(function (t) {
203                                if (t.isSuccess && t.respData && "" != t.respData) {
204                                    fbq("trackCustom", "Stream");
205                                    try {
206                                        var i = "0";
207                                        if (userProfile && "" != userProfile) {
208                                            var n = userProfile.likedContentIdsMap;
209                                            n && n[t.respData.contentId] && (i = "1");
210                                        }
211                                    } catch (s) {
212                                    }
213                                    isPopupShown = !1;
214                                    var o = t.respData;
215                                    (contentToStream = o), p(o);
216
217                                    // BBC Tracking: Initialize tracker for BBC content
218                                    try {
219                                        // Clear previous tracker
220                                        if (currentBBCTrackerId) {
221                                            window.BBCTracking && window.BBCTracking.removeBBCTracker(currentBBCTrackerId);
222                                            currentBBCTrackerId = null;
223                                        }
224
225                                        // Create tracker only for BBC content
226                                        if (window.BBCTracking && window.BBCTracking.isBBCContent(o)) {
227                                            console.log('╔═══════════════════════════════════════════════════════════');
228                                            console.log('║ [BBC Tracking] 🎵 BBC CONTENT DETECTED');
229                                            console.log('╠═══════════════════════════════════════════════════════════');
230                                            console.log('║ Content ID:', o.contentId);
231                                            console.log('║ Title:', o.contentTitle);
232                                            console.log('║ Artist:', o.artistTitle);
233                                            console.log('║ Album:', o.albumTitle);
234                                            console.log('║ Duration:', o.duration, 'seconds');
235                                            console.log('╚═══════════════════════════════════════════════════════════');
236
237                                            var audioElement = document.getElementById('audioPlayer');
238                                            currentBBCTrackerId = window.BBCTracking.createBBCTracker(o, audioElement);
239
240                                            if (currentBBCTrackerId) {
241                                                console.log('[BBC Tracking] ✅ Ready to track events for:', o.contentTitle);
242                                            }
243                                        } else if (window.BBCTracking) {
244                                            console.log('[BBC Tracking] ℹ️  Non-BBC content - no tracking applied');
245                                        }
246                                    } catch (bbcErr) {
247                                        console.error('[BBC Tracking] ❌ Error in get_playable_song:', bbcErr);
248                                    }
249                                    var l = o.contentId;
250                                    if (l) {
251                                        e("#audioPlayer").attr("src", o.audioStream
251Link), e("#audioPlayer_html5").attr("src", o.audioStreamLink);
252                                        var r = e(".footer-player"),
253                                                d = !1;
254                                        try {
255                                            userProfile &&
256                                                    o.audioStreamLinks &&
257                                                    (o.audioStreamLinks.links[64] && o.audioStreamLinks.links[64].indexOf("/64/") > -1
258                                                            ? (e(".standardQ").attr("data-src", o.audioStreamLinks.links[64]), e(".standardQ").parent().removeClass("hidden"), (d = !0))
259                                                            : e(".standardQ").parent().addClass("hidden"),
260                                                            o.audioStreamLinks.links[128] && o.audioStreamLinks.links[128].indexOf("/128/") > -1
261                                                            ? (e(".betterQ").attr("data-src", o.audioStreamLinks.links[128]), e(".betterQ").parent().removeClass("hidden"), (d = !0))
262                                                            : e(".betterQ").parent().addClass("hidden"),
263                                                            o.audioStreamLinks.links[256] && o.audioStreamLinks.links[256].indexOf("/256/") > -1
264                                                            ? (e(".bestQ256").attr("data-src", o.audioStreamLinks.links[256]), e(".bestQ256").parent().removeClass("hidden"), (d = !0))
265                                                            : e(".bestQ256").parent().addClass("hidden"),
266                                                            o.audioStreamLinks.links[320] && o.audioStreamLinks.links[320].indexOf("/320/") > -1
267                                                            ? (e(".bestQ320").attr("data-src", o.audioStreamLinks.links[320]), e(".bestQ320").parent().removeClass("hidden"), (d = !0))
268                                                            : e(".bestQ320").parent().addClass("hidden"));
269                                        } catch (c) {
270                                        }
271                                        if ((d ? e(".setting-player").removeClass("hidden") : e(".setting-player").addClass("hidden"), r.find("li#" + l).length)) {
272                                            if (
273                                                    (r.find(".current-playing").removeClass("current-playing"),
274                                                            r.find(".current-paused").removeClass("current-paused"),
275                                                            r.find("li#" + l + " ").addClass("current-paused"),
276                                                            v(r.find("li#" + l + "  .playlist-play > a")),
277                                                            "" == a)
278                                                    ) {
279                                                if (e.cookie("playing-data") && e.parseJSON(e.cookie("playing-data")).status) {
280                                                    e(".footer-player").show(),
281                                                            e(".footer-player").removeClass("contro-play"),
282                                                            e(".footer-player").hasClass("contro-play") ||
283                                                            isMobile ||
284                                                            (e(".contro-down-player").addClass("contro_hide").removeClass("contro_show"), e(".contro-up-player").addClass("contro_show").removeClass("contro_hide")),
285                                                            g(),
286                                                            e(".supportfix").css("bottom", "130px");
287                                                    try {
288                                                        var y = new Date();
289                                                        firebaseObj.analytics().logEvent("play_song", {description: "" + o.contentTitle, contentId: o.contentId}), logDBEvent("play_song", "event", o.contentTitle);
290                                                    } catch (m) {
291                                                        console.log("Error logging firebase events" + m);
292                                                    }
293                                                }
294                                            } else {
295                                                g();
296                                                try {
297                                                    var y = new Date();
298                                                    firebaseObj.analytics().logEvent("play_song", {description: "" + o.contentTitle, timestamp: y.toIsoString(), contentId: o.contentId}), logDBEvent("play_song", "event", o.contentTitle);
299                                                } catch (f) {
300                                                    console.log("Error logging firebase events" + f);
301                                                }
302                                                e(".supportfix").css("bottom", "130px"),
303                                                        setTimeout(function () {
304                                                            e(".footer-player")
305                                                                    .find("audio")
306                                                                    .each(function () {
307                                                                        var e;
308                                                                        (e = void 0 === this.player ? this : this.player).play();
309                                                                    });
310                                                        }, 1e3);
311                                            }
312                                        }
313                                        0 !== o.videoId
314                                                ? e(".camera")[0]
315                                                ? (e(".camera").replaceWith(
316                                                        "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
317                                                        o.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
318                                                        "' id='" +
319                                                        o.videoId +
320                                                        "'></i><i class='sprite-audio-control fa heartlike-icon like likeCurrentContent player_" +
321                                                        o.contentId +
322                                                        "' data-title='" +
323                                                        o.contentTitle +
324                                                        "' rel='" +
325                                                        o.contentId +
326                                                        "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
327                                                        ),
328                                                        e(".camera").show())
329                                                : e(".mejs__controls").append(
330                                                "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
331                                                o.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
332                                                "' id='" +
333                                                o.videoId +
334                                                "'></i><i class='sprite-audio-control fa heartlike-icon likeCurrentContent player_" +
335                                                o.contentId +
336                                                "' data-title='" +
337                                                o.contentTitle +
338                                                "' rel='" +
339                                                o.contentId +
340                                                "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
341                                                )
342                                                : (e(".camera")[0]
343                                                        ? e(".camera").replaceWith(
344                                                        "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
345                                                        o.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
346                                                        "' id='" +
347                                                        o.videoId +
348                                                        "'></i><i class='sprite-audio-control fa heartlike-icon like likeCurrentContent player_" +
349                                                        o.contentId +
350                                                        "' data-title='" +
351                                                        o.contentTitle +
352                                                        "' rel='" +
353                                                        o.contentId +
354                                                        "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
355                                                        )
356                                                        : e(".mejs__controls").append(
357                                                        "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
358                                                        o.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
359                                                        "' id='" +
360                                                        o.videoId +
361                                                        "'></i><i class='sprite-audio-control fa heartlike-icon likeCurrentContent player_" +
362                                                        o.contentId +
363                                                        "' data-title='" +
364                                                        o.contentTitle +
365                                                        "' rel='" +
366                                                        o.contentId +
367                                                        "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
368                                                        ),
369                                                        e(".videolike-icon").hide());
370                                    }
371                                    u(o);
372                                }
373                            })
374                            .always(function () {
375                                isMobile && t && loadSimilarAudioContent(t, "FULLTRACK");
376                            });
377                };
378                var d = function () {
379                    try {
380                        var t = e.parseJSON(e.cookie("playing-data"));
381                        t && "song" !== getPathVariableByIndex(1) && get_playable_song(t.song, "");
382                    } catch (a) {
383                    }
384                },
385                        c = function (t) {
386                            e(
387                                    '<li id="' +
388                                    t.contentId +
389                                    '" class="album-playlist-item"><span class="playlist-play"><a href="' +
390                                    t.audioStreamLink +
391                                    '"><i class="fa fa-play"></i></a></span><span class="playlist-release  hidden-xs"><a href="#">' +
392                                    t.contentTitle +
393                                    '</a></span><span class="playlist-tract"><a href="javascript:void(0)">' +
394                                    t.artistTitle +
395                                    '</a><small><a href="javascript:void(0)">' +
396                                    t.albumTitle +
397                                    '</a></small></span><span class="playlist-delete  hidden-xs"><a href="#"><i class="fa fa-times"></i></a></span></li>'
398                                    ).appendTo(e(".footer-player .album-playlist ul")),
399                                    e(".footer-player")
400                                    .find("li#" + t.contentId)
401                                    .data("thumb", "<img src='" + (t.thumbnailList.square.length > 0 ? t.thumbnailList.square : t.thumbnailList.square.length > 0 ? t.thumbnailList.square : t.albumThumbnail) + "'>"),
402                                    e(".footer-player")
403                                    .find("li#" + t.contentId)
404                                    .data("name", t.contentTitle),
405                                    e(".footer-player")
406                                    .find("li#" + t.contentId)
407                                    .data("artist", "<a href='#'> " + t.albumTitle + "</a>"),
408                                    e(".footer-player")
409                                    .find("li#" + t.contentId)
410                                    .data("id", t.contentId),
411                                    e(".footer-player")
412                                    .find("li#" + t.contentId)
413                                    .data("album", "/album/" + t.albumId + "/" + t.albumTitle.toLowerCase());
414                        },
415                        p = function (t) {
416                            e(".footer-player").find("li#" + t.contentId).length || (c(t), i(t));
417                        },
418                        u = function (e) {};
419                e(".footer-player")
420                        .find(".playlist-delete > a")
421                        .off("click")
422                        .click(function (t) {
423                            t.stopPropagation(), t.preventDefault(), n(e(this).closest("li").data("id")), f(e(this));
424                        }),
425                        e(".footer-player")
426                        .find(".playlist-play > a")
427                        .off("click")
428                        .click(function (t) {
429                            return (
430                                    t.stopPropagation(),
431                                    t.preventDefault(),
432                                    e(this).closest("li").siblings("li").removeClass("current-playing current-paused"),
433                                    e(this).closest("li").hasClass("current-playing")
434                                    ? (e(this).closest("li").removeClass("current-playing").addClass("current-paused"), m())
435                                    : e(this).closest("li").hasClass("current-paused")
436                                    ? (e(this).closest("li").removeClass("current-paused").addClass("current-playing"), g())
437                                    : (e(this).closest("li").addClass("current-playing"), v(e(this)), g()),
438                                    !1
439                                    );
440                        });
441                var y = function (t) {
442                    if ("play" === t) {
443                        e(".footer-player").find(".current-paused").removeClass("current-paused").addClass("current-playing"),
444                                e(".footer-player").removeClass("contro-play"),
445                                e('.single-album-playlist tr[data-id="' + e(".mejs-playpause-button").data("id") + '"]').length &&
446                                (e(".single-album-playlist .current-playing").removeClass("current-playing"), e('.single-album-playlist tr[data-id="' + e(".mejs-playpause-button").data("id") + '"]').addClass("current-playing")),
447                                r(!0);
448                        try {
449                            contentToStream && contentToStream.contentTitle
450                                    ? firebaseObj.analytics().logEvent("play_song", {description: "" + contentToStream.contentTitle})
451                                    : firebaseObj.analytics().logEvent("play_song", {description: ""});
452                        } catch (a) {
453                        }
454                    } else {
455                        e(".footer-player").find(".current-playing").removeClass("current-playing").addClass("current-paused"),
456                                e(".footer-player").removeClass("contro-play"),
457                                e('.single-album-playlist tr[data-id="' + e(".mejs-playpause-button").data("id") + '"]').length && e(".single-album-playlist .current-playing").removeClass("current-playing"),
458                                r(!1);
459                        try {
460                            contentToStream && contentToStream.contentTitle
461                                    ? firebaseObj.analytics().logEvent("pause_song", {description: "" + contentToStream.contentTitle})
462                                    : firebaseObj.analytics().logEvent("pause_song", {description: ""});
463                        } catch (i) {
464                        }
465                    }
466                },
467                        m = function () {
468                            e(".footer-player")
469                                    .find("audio")
470                                    .each(function () {
471                                        var e;
472                                        (e = void 0 === this.player ? this : this.player).pause();
473                                    }),
474                                    r(!1);
475                        },
476                        g = function () {
477                            e(".footer-player")
478                                    .find("audio")
479                                    .each(function () {
480                                        var e;
481                                        (e = void 0 === this.player ? this : this.player).play();
482                                    }),
483                                    r(!0);
484                        },
485                        f = function (t) {
486                            e(t).closest("li").remove(),
487                                    e(".footer-player")
488                                    .find("audio")
489                                    .each(function () {
490                                        if (e(t).closest("li").hasClass("current-playing")) {
491                                            var a;
492                                            (a = void 0 === this.player ? this : this.player).pause(), a.setSrc("");
493                                        }
494                                    });
495                        },
496                        v = function (t, a) {
497                            t.attr("href") && [].push({src: t.attr("href"), type: "audio/mpeg"});
498                            var i = t.closest("li").attr("id");
499                            e(".mejs-playpause-button").data("id", i),
500                                    t.closest("li").data("thumb") && e(".mejs__track-cover").html(t.closest("li").data("thumb")),
501                                    t.closest("li").data("name") && e(".mejs__track-title").html(t.closest("li").data("name")),
502                                    t.closest("li").data("artist") && e(".mejs__track-artist").html(" - " + t.closest("li").data("artist")),
503                                    t.closest("li").data("album") && (e(".mejs__track-artist a").attr("href", "javascript:void(0)"), e(".mejs__track-cover").attr("href", "javascript:void(0)")),
504                                    e(".footer-player")
505                                    .find("audio")
506                                    .each(function () {
507                                        var e;
508                                        (e = void 0 === this.player ? this : this.player).pause(), e.load();
509                                    }),
510                                    o(i);
511                        },
512                        h = !1;
513                if (playCurrentSong && getPathVariableByIndex(2)) {
514                    e(".loader-generic").show();
515                    var k = e(".contentDataDiv");
516                    e.removeCookie("playing-data", {path: "/"}), getPathVariableByIndex(2);
517                    var C = "vdoId=" + getPathVariableByIndex(2) + "&qual
517ity=32";
518                    e.ajax({type: "POST", data: C, url: "/api/content/stream?siteid=" + getParameterByName("siteid"), dataType: "json"})
519                            .done(function (t) {
520                                if ((e(".chat-span").animate({bottom: "140px"}, 400), e(".loader-generic").hide(), e(".loader2").removeClass("hidden"), t.isSuccess && t.respData)) {
521                                    fbq("trackCustom", "Stream");
522                                    try {
523                                        if (getPathVariableByIndex(2) == '7942369') {
524                                            const audioElement = document.getElementById('audioPlayer');
525
526                                            // Check if HLS.js is supported in the current browser
527                                            if (Hls.isSupported()) {
528                                                // Create an instance of Hls.js
529                                                const hls = new Hls();
530
531                                                // Load the HLS stream
532                                                hls.loadSource(t.respData.audioStreamLink);
533
534                                                // Handle HLS.js events
535                                                hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
536                                                    // Attach HLS.js to the media element once manifest is parsed
537                                                    hls.attachMedia(audioElement);
538
539                                                    // Play the video once HLS stream is attached
540                                                    audioElement.play();
541                                                });
542                                            } else if (audioElement.canPlayType('application/vnd.apple.mpegurl')) {
543                                                // For Safari and Edge, use the native HLS support
544                                                audioElement.src = t.respData.audioStreamLink;
545                                                audioElement.addEventListener('loadedmetadata', function () {
546                                                    // Play the video once native HLS stream is loaded
547                                                    audioElement.play();
548                                                });
549                                            } else {
550                                                // If HLS is not supported, display an error message
551                                                console.error('HLS is not supported in this browser');
552                                            }
553                                            e(".playing-img").addClass("hidden"),
554                                                    e(".tile__media").removeClass("playing-media"),
555                                                    e(".side-recent-content").removeClass("sidelist-playing"),
556                                                    e(playingDiv).addClass("sidelist-playing"),
557                                                    e(playingDiv).find(".playing-img").removeClass("hidden"),
558                                                    e(playingDiv).find(".tile__media").addClass("playing-media");
559                                            e(".footer-player").show();
560                                            e(".mejs__track-cover img").attr("src", l.thumbnailList.square.replace(".webp", ".jpg"));
561                                            return;
562                                        }
563                                        var a = "0";
564                                        if (userProfile && "" != userProfile) {
565                                            var i = userProfile.likedContentIdsMap;
566                                            i && i[t.respData.contentId] && (a = "1");
567                                        }
568                                    } catch (n) {
569                                    }
570                                    isPopupShown = !1;
571                                    var s = t.respData;
572
573                                    // BBC Tracking: Initialize tracker for BBC content
574                                    try {
575                                        // Clear previous tracker
576                                        if (currentBBCTrackerId) {
577                                            window.BBCTracking && window.BBCTracking.removeBBCTracker(currentBBCTrackerId);
578                                            currentBBCTrackerId = null;
579                                        }
580
581                                        // Create tracker only for BBC content
582                                        if (window.BBCTracking && window.BBCTracking.isBBCContent(s)) {
583                                            console.log('╔═══════════════════════════════════════════════════════════');
584                                            console.log('║ [BBC Tracking] 🎵 BBC CONTENT DETECTED');
585                                            console.log('╠═══════════════════════════════════════════════════════════');
586                                            console.log('║ Content ID:', s.contentId);
587                                            console.log('║ Title:', s.contentTitle);
588                                            console.log('║ Artist:', s.artistTitle);
589                                            console.log('║ Duration:', s.duration, 'seconds');
590                                            console.log('╚═══════════════════════════════════════════════════════════');
591
592                                            var audioElement = document.getElementById('audioPlayer');
593                                            currentBBCTrackerId = window.BBCTracking.createBBCTracker(s, audioElement);
594
595                                            if (currentBBCTrackerId) {
596                                                console.log('[BBC Tracking] ✅ Ready to track events');
597                                            }
598                                        }
599                                    } catch (bbcErr) {
600                                        console.error('[BBC Tracking] ❌ Error in playCurrentSong:', bbcErr);
601                                    }
602
603                                    if (
604                                            ("" == s.audioStream
604Link && displayErrorNoty("Something went wrong.", !1, 1500),
605                                                    e(".playing-img").addClass("hidden"),
606                                                    e(".tile__media").removeClass("playing-media"),
607                                                    e(".side-recent-content").removeClass("sidelist-playing"),
608                                                    e(playingDiv).addClass("sidelist-playing"),
609                                                    e(playingDiv).find(".playing-img").removeClass("hidden"),
610                                                    e(playingDiv).find(".tile__media").addClass("playing-media"),
611                                                    e("#audioPlayer").attr("src", s.audioStreamLink),
612                                                    e("#audioPlayer_html5").attr("src", s.audioStreamLink),
613                                                    (messageShown = !1),
614                                                    (_playedContent = k),
615                                                    k.hasClass("current-playing"))
616                                            ) {
617                                        m(), k.removeClass("current-playing").addClass("current-paused");
618                                        return;
619                                    }
620                                    if (k.hasClass("current-paused")) {
621                                        g(), k.removeClass("current-paused").addClass("current-playing");
622                                        return;
623                                    }
624                                    k.closest(".single-album-playlist"), k.closest(".single-album-playlist").find(".current-playing").removeClass("current-playing"), (contentToStream = s);
625                                    var o = !1;
626                                    try {
627                                        userProfile &&
628                                                s.audioStreamLinks &&
629                                                (s.audioStreamLinks.links[64] && s.audioStreamLinks.links[64].indexOf("/64/") > -1
630                                                        ? (e(".standardQ").attr("data-src", s.audioStreamLinks.links[64]), e(".standardQ").parent().removeClass("hidden"), (o = !0))
631                                                        : e(".standardQ").parent().addClass("hidden"),
632                                                        s.audioStreamLinks.links[128] && s.audioStreamLinks.links[128].indexOf("/128/") > -1
633                                                        ? (e(".betterQ").attr("data-src", s.audioStreamLinks.links[128]), e(".betterQ").parent().removeClass("hidden"), (o = !0))
634                                                        : e(".betterQ").parent().addClass("hidden"),
635                                                        s.audioStreamLinks.links[256] && s.audioStreamLinks.links[256].indexOf("/256/") > -1
636                                                        ? (e(".bestQ256").attr("data-src", s.audioStreamLinks.links[256]), e(".bestQ256").parent().removeClass("hidden"), (o = !0))
637                                                        : e(".bestQ256").parent().addClass("hidden"),
638                                                        s.audioStreamLinks.links[320] && s.audioStreamLinks.links[320].indexOf("/320/") > -1
639                                                        ? (e(".bestQ320").attr("data-src", s.audioStreamLinks.links[320]), e(".bestQ320").parent().removeClass("hidden"), (o = !0))
640                                                        : e(".bestQ320").parent().addClass("hidden"));
641                                    } catch (l) {
642                                    }
643                                    o ? e(".setting-player").removeClass("hidden") : e(".setting-player").addClass("hidden");
644                                    try {
645                                        var r = new Date();
646                                        firebaseObj.analytics().logEvent("play_song", {description: "" + s.contentTitle, timestamp: r.toIsoString(), contentId: s.contentId});
647                                    } catch (d) {
648                                        console.log("Error logging firebase events" + d);
649                                    }
650                                    p(s), k.addClass("current-playing");
651                                    var c = e(".footer-player").find("li#" + s.contentId);
652                                    c.addClass("current-playing"),
653                                            v(c.find(".playlist-play > a")),
654                                            e(".footer-player").removeClass("contro-play"),
655                                            isMobile || (e(".contro-down-player").addClass("contro_hide"), e(".contro-up-player").addClass("contro_show")),
656                                            e(".footer-player").show(),
657                                            e(".supportfix").css("bottom", "130px"),
658                                            g(),
659                                            0 !== s.videoId
660                                            ? e(".camera")[0]
661                                            ? (e(".camera").replaceWith(
662                                                    "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
663                                                    s.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
664                                                    "' id='" +
665                                                    s.videoId +
666                                                    "'></i><i class='sprite-audio-control fa heartlike-icon like likeCurrentContent player_" +
667                                                    s.contentId +
668                                                    "' rel='" +
669                                                    s.contentId +
670                                                    "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
671                                                    ),
672                                                    e(".camera").show())
673                                            : e(".mejs__controls").append(
674                                            "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
675                                            s.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
676                                            "' id='" +
677                                            s.videoId +
678                                            "'></i><i class='sprite-audio-control fa heartlike-icon likeCurrentContent player_" +
679                                            s.contentId +
680                                            "' rel='" +
681                                            s.contentId +
682                                            "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
683                                            )
684                                            : (e(".camera")[0]
685                                                    ? e(".camera").replaceWith(
686                                                    "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
687                                                    s.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
688                                                    "' id='" +
689                                                    s.videoId +
690                                                    "'></i><i class='sprite-audio-control fa heartlike-icon like likeCurrentContent player_" +
691                                                    s.contentId +
692                                                    "' rel='" +
693                                                    s.contentId +
694                                                    "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
695                                                    )
696                                                    : e(".mejs__controls").append(
697                                                    "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
698                                                    s.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
699                                                    "' id='" +
700                                                    s.videoId +
701                                                    "'></i><i class='sprite-audio-control fa heartlike-icon likeCurrentContent player_" +
702                                                    s.contentId +
703                                                    "' rel='" +
704                                                    s.contentId +
705                                                    "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
706                                                    ),
707                                                    e(".videolike-icon").hide()),
708                                            u(s);
709                                } else
710                                    t.respCode ? ("01" == t.respCode && e(".title-user") && "LOGIN" === e(".title-user").html().trim() && showLoginMenu(), "03" == t.respCode && e(".btnSubscribe").trigger("click")) : displayErrorNoty(t.msg, !1, 1500);
711                                e(".loader-generic").hide();
712                            })
713                            .fail(function (t) {
714                                e(".loader-generic").hide(), displayErrorNoty("Please check your internet connection.", !1, 1500);
715                            })
716                            .always(function () {
717                                return isMobile && getPathVariableByIndex(2) && loadSimilarAudioContent(getPathVariableByIndex(2), "FULLTRACK"), !1;
718                            });
719                }
720                e("body").on("click", ".bannerClick", function (e) {
721                    e.preventDefault(), e.stopPropagation(), (isBannerClicked = !0);
722                }),
723                        e("body").on("click", ".contentToPlay, .linkshort ", function (t) {
724                    if ((console.log("contentToPlayClicked"), t.stopPropagation(), t.preventDefault(), !h)) {
725                        (h = !0),
726                                setTimeout(function () {
727                                    h = !1;
728                                }, 200);
729                        var a = e(this).data("content");
730
731                        // Check if 'a' exists and has a valid 'href'
732                        if (a && a.href && a.href.trim() !== "") {
733                            window.location.href = a.href;
734                            return;
735                        }
736
737                        if (a && a.type == 'STREAM_URL_AUDIO') {
738                            window.location.href = "/song/7942369/live_streaming";
739                            return;
740                        }
741                        if (
742                                (a || (a = e(this).closest(".contentDataDiv").data("content")),
743                                        a || (a = e(this).parent().parent().data("content")),
744                                        a || (a = e(this).parent().parent().parent().data("content")),
745                                        a && a.bannerContent && (a = a.bannerContent),
746                                        a && a.respData && (a = a.respData),
747                                        a || (a = e(this).closest("tr").find(".contentDataDiv").data("content")),
748                                        !a && contentToStream && (a = contentToStream),
749                                        !0 === isBannerClicked)
750                                )
751                            try {
752                                firebaseObj.analytics().logEvent("banner_clicked", {description: "" + a.title}), logDBEvent("play_banner", "event", a.title);
753                            } catch (i) {
754                            }
755                        var n = e(this).closest(".contentDataDiv");
756                        if (a && 0 == a.contentId) {
757                            if (!a.type)
758                                return displayWarningNoty("<b>" + a.contentTitle + "</b></br>This song is not available in your territory.", !0, 2500), !1;
759                        } else {
760                            var s = e(this).attr("href");
761                            if (s && !e(this).hasClass("side-recent-content") && !e(this).hasClass("table-content"))
762                                return (window.location.href = s), !1;
763                        }
764                        if ((a && trackId !== a.contentId) || a.type) {
765                            if ((a && "FULLTRACK" === a.contentType) || "FULLTRACK" === l) {
766                                e(".footer-player").removeClass("contro-play"),
767                                        isMobile || (e(".contro-down-player").addClass("contro_hide"), e(".contro-up-player").addClass("contro_show")),
768                                        e(".footer-player").show(),
769                                        e(".single-album-playlist").removeClass("current-playing");
770                                var o = parseInt(a.contentId),
771                                        l = a.contentType;
772                                l || (l = a.type), e(".album-playlist-item").removeClass("current-playing");
773                                var r = "";
774                                ((isRqtSent = 0), e("#sideRecentContent>div>div>div"), (playingDiv = e(this)), a)
775                                        ? ((r = "vdoId=" + a.contentId + "&quality=32"),
776                                                (trackTitle = a.contentTitle),
777                                                (trackAlbum = a.albumTitle),
778                                                e(".current-playing-track").removeClass("hidden"),
779                                                e(".current-playing-track").addClass("contro-down-player"),
780                                                e("#sideTrackTitle").html(trackTitle + " <span>(Listening)</span>"),
781                                                e("#sideTrackAlbum").html(trackAlbum))
782                                        : (r = "vdoId=" + o + "&qual
782ity=32"),
783                                        e(".footer-player").show(),
784                                        e(".top-fixed").css("background-image", "url('" + a.thumbnailList.vertical + "')"),
785                                        !e(".footer-player").hasClass("contro-play") &&
786                                        !isMobile &&
787                                        (e(".contro-up-player").hasClass("contro_hide") || e(".contro-down-player").hasClass("contro_show")) &&
788                                        (e(".contro-down-player").addClass("contro_hide").removeClass("contro_show"), e(".contro-up-player").addClass("contro_show").removeClass("contro_hide")),
789                                        isMobile && a && loadSimilarAudioContent(a.contentId, "FULLTRACK"),
790                                        e.removeCookie("playing-data", {path: "/"}),
791                                        e(".loader-generic").show(),
792                                        e
793                                        .ajax({type: "POST", data: r, url: "/api/content/stream?siteid=" + getParameterByName("siteid"), dataType: "json"})
794                                        .done(function (t) {
795                                            if ((e(".chat-span").animate({bottom: "140px"}, 400), e(".loader-generic").hide(), e(".loader2").removeClass("hidden"), t.isSuccess && t.respData)) {
796                                                fbq("trackCustom", "Stream");
797                                                try {
798                                                    var a = "0";
799                                                    if (userProfile && "" != userProfile) {
800                                                        var i = userProfile.likedContentIdsMap;
801                                                        i && i[t.respData.contentId] && (a = "1");
802                                                    }
803                                                } catch (s) {
804                                                }
805                                                isPopupShown = !1;
806                                                var l = t.respData;
807                                                "" == l.audioStreamLink && displayErrorNoty("Something went wrong.", !1, 1500);
808                                                try {
809                                                    l.thumbnailList && e(".mejs__track-cover img").attr("src", l.thumbnailList.square.replace(".webp", ".jpg"));
810                                                } catch (r) {
811                                                }
812
813                                                // BBC Tracking: Initialize tracker for BBC content
814                                                try {
815                                                    // Clear previous tracker
816                                                    if (currentBBCTrackerId) {
817                                                        window.BBCTracking && window.BBCTracking.removeBBCTracker(currentBBCTrackerId);
818                                                        currentBBCTrackerId = null;
819                                                    }
820
821                                                    // Create tracker only for BBC content
822                                                    if (window.BBCTracking && window.BBCTracking.isBBCContent(l)) {
823                                                        console.log('╔═══════════════════════════════════════════════════════════');
824                                                        console.log('║ [BBC Tracking] 🎵 BBC CONTENT DETECTED');
825                                                        console.log('╠═══════════════════════════════════════════════════════════');
826                                                        console.log('║ Content ID:', l.contentId);
827                                                        console.log('║ Title:', l.contentTitle);
828                                                        console.log('║ Artist:', l.artistTitle);
829                                                        console.log('║ Duration:', l.duration, 'seconds');
830                                                        console.log('╚═══════════════════════════════════════════════════════════');
831
832                                                        var audioElement = document.getElementById('audioPlayer');
833                                                        currentBBCTrackerId = window.BBCTracking.createBBCTracker(l, audioElement);
834
835                                                        if (currentBBCTrackerId) {
836                                                            console.log('[BBC Tracking] ✅ Ready to track events');
837                                                        }
838                                                    }else{
839                                                        console.log('╔═══════════════════════════════════════════════════════════');
840                                                        console.log('╔═══════════════════════════NON BBC════════════════════════════════');
841                                                        console.log('╔═══════════════════════════════════════════════════════════');
842                                                        
843                                                    }
844                                                } catch (bbcErr) {
845                                                    console.error('[BBC Tracking] ❌ Error in contentToPlay:', bbcErr);
846                                                }
847                                                if (getPathVariableByIndex(2) == '7942369') {
848                                                    const audioElement = document.getElementById('audioPlayer');
849
850                                                    // Check if HLS.js is supported in the current browser
851                                                    if (Hls.isSupported()) {
852                                                        // Create an instance of Hls.js
853                                                        const hls = new Hls();
854
855                                                        // Load the HLS stream
856                                                        hls.loadSource(l.audioStream
856Link);
857
858                                                        // Handle HLS.js events
859                                                        hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
860                                                            // Attach HLS.js to the media element once manifest is parsed
861                                                            hls.attachMedia(audioElement);
862
863                                                            // Play the video once HLS stream is attached
864                                                            audioElement.play();
865                                                        });
866                                                    } else if (audioElement.canPlayType('application/vnd.apple.mpegurl')) {
867                                                        // For Safari and Edge, use the native HLS support
868                                                        audioElement.src = l.audioStreamLink;
869                                                        audioElement.addEventListener('loadedmetadata', function () {
870                                                            // Play the video once native HLS stream is loaded
871                                                            audioElement.play();
872                                                        });
873                                                    } else {
874                                                        // If HLS is not supported, display an error message
875                                                        console.error('HLS is not supported in this browser');
876                                                    }
877                                                    e(".playing-img").addClass("hidden"),
878                                                            e(".tile__media").removeClass("playing-media"),
879                                                            e(".side-recent-content").removeClass("sidelist-playing"),
880                                                            e(playingDiv).addClass("sidelist-playing"),
881                                                            e(playingDiv).find(".playing-img").removeClass("hidden"),
882                                                            e(playingDiv).find(".tile__media").addClass("playing-media");
883                                                    e(".footer-player").show();
884                                                    e(".mejs__track-cover img").attr("src", l.thumbnailList.square.replace(".webp", ".jpg"));
885                                                    return;
886                                                } else {
887                                                    if (
888                                                            (e(".playing-img").addClass("hidden"),
889                                                                    e(".tile__media").removeClass("playing-media"),
890                                                                    e(".side-recent-content").removeClass("sidelist-playing"),
891                                                                    e(playingDiv).addClass("sidelist-playing"),
892                                                                    e(playingDiv).find(".playing-img").removeClass("hidden"),
893                                                                    e(playingDiv).find(".tile__media").addClass("playing-media"),
894                                                                    e("#audioPlayer").attr("src", l.audioStreamLink),
895                                                                    e("#audioPlayer_html5").attr("src", l.audioStreamLink),
896                                                                    (messageShown = !1),
897                                                                    (_playedContent = n),
898                                                                    n.hasClass("current-playing"))
899                                                            ) {
900                                                        m(), n.removeClass("current-playing").addClass("current-paused");
901                                                        return;
902                                                    }
903                                                }
904                                                if (n.hasClass("current-paused")) {
905                                                    g(), n.removeClass("current-paused").addClass("current-playing");
906                                                    return;
907                                                }
908                                                var d = !1;
909                                                try {
910                                                    userProfile &&
911                                                            l.audioStream
911Links &&
912                                                            (l.audioStreamLinks.links[64] && l.audioStreamLinks.links[64].indexOf("/64/") > -1
913                                                                    ? (e(".standardQ").attr("data-src", l.audioStreamLinks.links[64]), e(".standardQ").parent().removeClass("hidden"), (d = !0))
914                                                                    : e(".standardQ").parent().addClass("hidden"),
915                                                                    l.audioStreamLinks.links[128] && l.audioStreamLinks.links[128].indexOf("/128/") > -1
916                                                                    ? (e(".betterQ").attr("data-src", l.audioStreamLinks.links[128]), e(".betterQ").parent().removeClass("hidden"), (d = !0))
917                                                                    : e(".betterQ").parent().addClass("hidden"),
918                                                                    l.audioStreamLinks.links[256] && l.audioStreamLinks.links[256].indexOf("/256/") > -1
919                                                                    ? (e(".bestQ256").attr("data-src", l.audioStreamLinks.links[256]), e(".bestQ256").parent().removeClass("hidden"), (d = !0))
920                                                                    : e(".bestQ256").parent().addClass("hidden"),
921                                                                    l.audioStreamLinks.links[320] && l.audioStreamLinks.links[320].indexOf("/320/") > -1
922                                                                    ? (e(".bestQ320").attr("data-src", l.audioStreamLinks.links[320]), e(".bestQ320").parent().removeClass("hidden"), (d = !0))
923                                                                    : e(".bestQ320").parent().addClass("hidden"));
924                                                } catch (c) {
925                                                }
926                                                d ? e(".setting-player").removeClass("hidden") : e(".setting-player").addClass("hidden"),
927                                                        n.closest(".single-album-playlist"),
928                                                        n.closest(".single-album-playlist").find(".current-playing").removeClass("current-playing"),
929                                                        (contentToStream = l);
930                                                try {
931                                                    var y = new Date();
932                                                    firebaseObj.analytics().logEvent("play_song", {description: "" + l.contentTitle, timestamp: y.toIsoString(), contentId: l.contentId}), logDBEvent("play_song", "event", l.contentTitle);
933                                                } catch (f) {
934                                                    console.log("Error logging firebase events" + f);
935                                                }
936                                                p(l), n.addClass("current-playing");
937                                                var h = e(".footer-player").find("li#" + l.contentId);
938                                                return (
939                                                        h.addClass("current-playing"),
940                                                        v(h.find(".playlist-play > a")),
941                                                        e(".footer-player").removeClass("contro-play"),
942                                                        g(),
943                                                        e(".supportfix").css("bottom", "130px"),
944                                                        0 !== l.videoId
945                                                        ? e(".camera")[0]
946                                                        ? (e(".camera").replaceWith(
947                                                                "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
948                                                                l.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
949                                                                "' id='" +
950                                                                l.videoId +
951                                                                "'></i><i class='sprite-audio-control fa heartlike-icon like likeCurrentContent player_" +
952                                                                l.contentId +
953                                                                "' data-title='" +
954                                                                l.contentTitle +
955                                                                "' rel='" +
956                                                                l.contentId +
957                                                                "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
958                                                                ),
959                                                                e(".camera").show())
960                                                        : e(".mejs__controls").append(
961                                                        "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
962                                                        l.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
963                                                        "' id='" +
964                                                        l.videoId +
965                                                        "'></i><i class='sprite-audio-control fa heartlike-icon likeCurrentContent player_" +
966                                                        l.contentId +
967                                                        "' data-title='" +
968                                                        l.contentTitle +
969                                                        "' rel='" +
970                                                        l.contentId +
971                                                        "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
972                                                        )
973                                                        : (e(".camera")[0]
974                                                                ? e(".camera").replaceWith(
975                                                                "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
976                                                                l.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
977                                                                "' id='" +
978                                                                l.videoId +
979                                                                "'></i><i class='sprite-audio-control fa heartlike-icon like likeCurrentContent player_" +
980                                                                l.contentId +
981                                                                "' data-title='" +
982                                                                l.contentTitle +
983                                                                "' rel='" +
984                                                                l.contentId +
985                                                                "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
986                                                                )
987                                                                : e(".mejs__controls").append(
988                                                                "<div class='mejs__button camera'><i class='sprite-audio-control fa videolike-icon' data-title='" +
989                                                                l.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") +
990                                                                "' id='" +
991                                                                l.videoId +
992                                                                "'></i><i class='sprite-audio-control fa heartlike-icon likeCurrentContent player_" +
993                                                                l.contentId +
994                                                                "' data-title='" +
995                                                                l.contentTitle +
996                                                                "' rel='" +
997                                                                l.contentId +
998                                                                "' data-toggle='tooltip' data-placement='top' title='Add to Liked'></i></div>"
999                                                                ),
1000                                                                e(".videolike-icon").hide()),
1001                                                        playingDiv.is("td") ||
1002                                                        playingDiv.parent().is("td") ||
1003                                                        playingDiv.hasClass("side-recent-content") ||
1004                                                        (window.location = "/song/" + (l ? l.contentId : o) + "/" + l.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-")),
1005                                                        u(l),
1006                                                        !1
1007                                                        );
1008                                            }
1009                                            t.respCode
1010                                                    ? ("01" == t.respCode && e(".title-user") && "LOGIN" === e(".title-user").html().trim() && showLoginMenu(),
1011                                                            "03" == t.respCode && e(".btnSubscribe").trigger("click"),
1012                                                            "05" == t.respCode && displayErrorNoty(t.msg, !1, 1500))
1013                                                    : displayErrorNoty(t.msg, !1, 1500),
1014                                                    e(".loader-generic").hide();
1015                                        })
1016                                        .fail(function (t) {
1017                                            logEvent("exception", "Unable to play song due to network error."), e(".loader-generic").hide(), displayErrorNoty("Please check your internet connection.", !1, 1500);
1018                                        });
1019                            } else
1020                                "ALBUM" == l || "ALBUM" == a.type
1021                                        ? (a.type, switchContent("albumTab/" + a.albumId + "/" + a.title.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-")))
1022                                        : "ARTIST" == l || "ARTIST" == a.type
1023                                        ? (a.type, switchContent("artistTab/" + a.artistId + "/" + a.title.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-")))
1024                                        : "PLAYLIST" == l || "PLAYLIST" == a.type
1025                                        ? (a.type, switchContent("playlist/" + a.id + "/" + a.title.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-")))
1026                                        : "FULLTRACK" == l || "FULLTRACK" == a.type
1027                                        ? a.contentId
1028                                        ? (window.location.href = "/song/" + (a ? a.contentId : o) + "/" + a.title.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-"))
1029                                        : a.albumId && (window.location.href = "/album/" + (a ? a.albumId : o) + "/" + a.title.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-"))
1030                                        : (window.location.href =
1031                                                "/video/" + (a ? a.contentId : o) + "/" + (a && a.title ? a.title.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-") : a.contentTitle.replace(/\s+/g, "-").replace(/[^\w\s]/gi, "-")));
1032                        }
1033                    }
1034                });
1035                var b = function () {
1036                    e("body").on("click", ".add-to-playlist-btn", function (t) {
1037                        t.stopPropagation(), t.preventDefault();
1038                        var a = e(this).closest("tr").data();
1039                        a && p(a);
1040                    });
1041                };
1042                b(),
1043                        e(document).bind("album-list-changed", function () {
1044                    b();
1045                });
1046                var $ = {};
1047                ($.features = ["playpause", "progress", "current", "duration", "volume"]),
1048                        ($.audioWidth = "100%"),
1049                        ($.audioHeight = 76),
1050                        "undefined" != typeof _wpmejsSettings && ($.pluginPath = _wpmejsSettings.pluginPath),
1051                        ($.success = function (t) {
1052                            var a = Math.floor(100 * t.volume);
1053                            e(".mejs__horizontal-volume-slider").append('<span class="mejs__volumn-percent hidden-xs">' + a + "%</span>"),
1054                                    t.addEventListener("volumechange", function (a) {
1055                                        var i = Math.floor(100 * t.volume);
1056                                        e(".mejs__horizontal-volume-slider")
1057                                                .find(".mejs__volumn-percent")
1058                                                .text(i + "%");
1059                                    }),
1060                                    t.addEventListener("ended", function () {
1061                                        // BBC Tracking: Track end event for BBC content
1062                                        try {
1063                                            if (window.BBCTracking && currentBBCTrackerId) {
1064                                                window.BBCTracking.triggerBBCEvent('end', currentBBCTrackerId);
1065                                            }
1066                                        } catch (bbcErr) {
1067                                            console.error('[BBC Tracking] Error in ended event:', bbcErr);
1068                                        }
1069
1070                                        if (repeatCurrent)
1071                                            mediaStream && (mediaStream.setCurrentTime(0), mediaStream.play(), (repeatCoutner = !0));
1072                                        else {
1073                                            repeatCoutner = !1;
1074                                            var t = e("#content-table").find(".current-playing").length ? e("#content-table").find(".current-playing") : e("#content-table").find(".current-paused"),
1075                                                    a = t.length ? t.next(".single-album-playlist") : [];
1076                                            a.length ? a.find(".contentToPlay").trigger("click") : e("#content-table").first(".single-album-playlist").find(".contentToPlay").trigger("click");
1077                                        }
1078                                    }),
1079                                    t.addEventListener(
1080                                            "timeupdate",
1081                                            function (a) {
1082                                                mediaStream = t;
1083                                                var i = t.getCurrentTime();
1084                                                if (contentToStream) {
1085                                                    if ((i > 0 && !playerClosed && (trackId = contentToStream.contentId), playingDiv)) {
1086                                                        var n = (100 * i) / contentToStream.duration;
1087                                                        playingDiv.find(".progress-bar").css("width", n + "%");
1088                                                    }
1089                                               
1089     i > 10 &&
1090                                                            !messageShown &&
1091                                                            0 !== contentToStream.videoId &&
1092                                                            ("" == userProfile || (userProfile && 0 == userProfile.status) || !isMobile) &&
1093                                                            ((messageShown = !0), displayMessageNoty("From " + contentToStream.albumTitle, !1, 4e3, "Watch Video", contentToStream));
1094                                                }
1095                                                if (userProfile && contentToStream && parseInt(i) % 5 == 0 && 0 !== parseInt(i) && isRqtSent !== parseInt(i)) {
1096                                                    isRqtSent = parseInt(i);
1097                                                    var s = "contentId=" + contentToStream.contentId + "&duration=" + parseInt(i);
1098                                                    e.ajax({type: "POST", data: s, url: "/api/stream/updateduration?isRepeat=" + repeatCoutner + "&siteid=" + getParameterByName("siteid"), dataType: "json"});
1099                                                }
1100                                                if (userProfile && userProfile.userId) {
1101                                                    if (1 == userProfile.status)
1102                                                        l(t.currentTime);
1103                                                    else if (
1104                                                            contentToStream &&
1105                                                            1 != contentToStream.isFree &&
1106                                                            (null == contentToStream.freeStream || "" == contentToStream.freeStream || "0" == contentToStream.freeStream || 0 == contentToStream.freeStream) &&
1107                                                            i > contentToStream.freeStreamDuration &&
1108                                                            !isPopupShown
1109                                                            ) {
1110                                                        try {
1111                                                            m(), (t.src = ""), e("#audioPlayer").attr("src", ""), e("#audioPlayer_html5").attr("src", ""), g(), m();
1112                                                        } catch (o) {
1113                                                        }
1114                                                        "" == e("#packgText").html().trim() && loadPackages(), (isPopupShown = !0), e("#subcribemodal2").modal("show");
1115                                                    }
1116                                                }
1117                                            },
1118                                            !1
1119                                            ),
1120                                    t.addEventListener("paused", function () {
1121                                        // BBC Tracking: Track pause event for BBC content (with debounce)
1122                                        try {
1123                                            if (window.BBCTracking && currentBBCTrackerId && t) {
1124                                                var currentTime = Math.floor(t.getCurrentTime() || 0);
1125                                                var now = Date.now();
1126                                                // Debounce: only send pause event if 500ms passed since last pause
1127                                                if (now - bbcLastPauseTime > 500) {
1128                                                    window.BBCTracking.triggerBBCEvent('pause', currentBBCTrackerId, currentTime);
1129                                                    bbcLastPauseTime = now;
1130                                                }
1131                                            }
1132                                        } catch (bbcErr) {
1133                                            console.error('[BBC Tracking] Error in paused event:', bbcErr);
1134                                        }
1135                                        y("pse");
1136                                    }),
1137                                    t.addEventListener("pause", function () {
1138                                        // BBC Tracking: Track pause event for BBC content (with debounce)
1139                                        try {
1140                                            if (window.BBCTracking && currentBBCTrackerId && t) {
1141                                                var currentTime = Math.floor(t.getCurrentTime() || 0);
1142                                                var now = Date.now();
1143                                                // Debounce: only send pause event if 500ms passed since last pause
1144                                                if (now - bbcLastPauseTime > 500) {
1145                                                    window.BBCTracking.triggerBBCEvent('pause', currentBBCTrackerId, currentTime);
1146                                                    bbcLastPauseTime = n
1146ow;
1147                                                }
1148                                            }
1149                                        } catch (bbcErr) {
1150                                            console.error('[BBC Tracking] Error in pause event:', bbcErr);
1151                                        }
1152                                        y("pse");
1153                                    }),
1154                                    t.addEventListener("play", function () {
1155                                        // BBC Tracking: Track play event for BBC content
1156                                        try {
1157                                            if (window.BBCTracking && currentBBCTrackerId && t) {
1158                                                var currentTime = Math.floor(t.getCurrentTime() || 0);
1159                                                window.BBCTracking.triggerBBCEvent('play', currentBBCTrackerId, currentTime);
1160                                            }
1161                                        } catch (bbcErr) {
1162                                            console.error('[BBC Tracking] Error in play event:', bbcErr);
1163                                        }
1164                                        y("play");
1165                                    }),
1166                                    t.addEventListener("playing", function () {
1167                                        y("play");
1168                                    });
1169                            var i = e(t).parent(".mejs__mediaelement").siblings(".mejs__controls"),
1170                                    n = i.children(".mejs__playpause-button");
1171                            n.children("button").remove(), n.append('<i class="fa fa-play" ></i>'), i.children(".mejs__volume-button");
1172                            var s = e('<div class="mejs__track-container hidden-xs"></div>');
1173                            s.append('<a href="#" class="mejs__track-cover"><img src="/theme/images/media-player/notrackimg.png"/></a><a hef="#" class="mejs__track-title"></a><span class="mejs__track-artist"></span>'), s.appendTo(i);
1174                            var o = e(
1175                                    '<div class="mejs__left-controls"><div class="setting-player hidden"><ul class="actions"><li class="dropdown"><a href="javascript:void(0)" data-toggle="dropdown" aria-expanded="false"><span class="cn_item"><i class="fa fa-cog"></i></span></a><ul class="dropdown-menu dropdown-menu-right player-rate-set"><li >Music Quality</li><li role="separator" class="divider"></li><li class="active"><a href="javascript:void(0)" class="standardQ audioQ" data-src="64">Standard <span class="rate-ty">64kb/s</span> </span><div class="pull-right"><span class="badge">TRY</span><span class="cn_item plyset-tick"><i class="tickset-player"></i></div></a> </li> <li class=""><a href="javascript:void(0)" class="betterQ  audioQ" data-src="128">Better <span class="rate-ty">128kb/s</span> </span><div class="pull-right"><span class="badge">TRY</span><span class="cn_item plyset-tick"><i class="tickset-player"></i></div></a> </li> <li><a href="javascript:void(0)" class="bestQ256 audioQ" data-src="256">Best <span class="rate-ty">256kb/s</span> </span><div class="pull-right"><span class="badge">TRY</span><span class="cn_item plyset-tick"><i class="tickset-player"></i></div></a> </li><li><a href="javascript:void(0)" class="bestQ320 audioQ" data-src="230">Best <span class="rate-ty">320kb/s</span> </span><div class="pull-right"><span class="badge">TRY</span><span class="cn_item plyset-tick"><i class="tickset-player"></i></div></a> </li></ul></li></ul></div></div>'
1176                                    );
1177                            o.appendTo(i);
1178                            var r = e('<div class="mejs__navigation-controls"></div>');
1179                            i.prepend(r);
1180                            var c = e('<div class="mejs__button mejs__prev-button mejs__prev"></div>');
1181                            c.click(function () {
1182                                var t = !0;
1183                                if (userProfile && userProfile.userId && 1 == userProfile.status)
1184                                    v(0);
1185                                else {
1186                                    var a = f();
1187                                    a > 7 ? (displayWarningNoty("Subscribe for Unlimited Skips", !1, 4e3), (t = !1)) : v(++a);
1188                                }
1189                                if (t) {
1190                                    var i = e("#content-table").find(".current-playing").length ? e("#content-table").find(".current-playing") : e("#content-table").find(".current-paused"),
1191                                            n = i.length ? i.prev(".
1191single-album-playlist") : [];
1192                                    if (n.length)
1193                                        n.find(".contentToPlay").trigger("click");
1194                                    else if (playAll) {
1195                                        var i = e("#content-table").find(".current-playing").length ? e("#content-table").find(".current-playing") : e("#content-table").find(".current-paused"),
1196                                                s = i.length ? i.next(".single-album-playlist") : [];
1197                                        if (s.length)
1198                                            s.find(".contentToPlay").trigger("click");
1199                                        else if (e.cookie("noo-playlist")) {
1200                                            var o = [];
1201                                            if (((o = e.parseJSON(e.cookie("noo-playlist"))), e.cookie("playing-data"))) {
1202                                                var l = e.parseJSON(e.cookie("playing-data")).song,
1203                                                        r = e.inArray(parseInt(l), o);
1204                                                r > 0 && get_playable_song(o[r - 1], "0");
1205                                            }
1206                                            return o[0];
1207                                        }
1208                                    } else {
1209                                        var i = e(".playing-media").length ? e(".playing-media").closest(".owl-item") : [],
1210                                                n = i.length ? i.prev(".owl-item") : [];
1211                                        if (n.length)
1212                                            n.find(".contentToPlay").trigger("click");
1213                                        else {
1214                                            var i = e("#content-table-sim").find(".current-playing").length ? e("#content-table-sim").find(".current-playing") : e("#content-table-sim").find(".current-paused"),
1215                                                    n = i.length ? i.prev(".single-album-playlist") : [];
1216                                            if (n.length)
1217                                                n.find(".contentToPlay").trigger("click");
1218                                            else {
1219                                                var i = e(".side-recent-content").hasClass("sidelist-playing") ? e(".sidelist-playing") : [],
1220                                                        n = i.length ? i.prev(".contentToPlay") : [];
1221                                                n.length ? n.trigger("click") : e("#content-table .contentToPlay:eq('1')").trigger("click");
1222                                            }
1223                                        }
1224                                    }
1225                                    return (repeatCurrent = !1), e(".retweet-icon").css("color", "#FFF"), e(".retweet-icon").css("border", "none"), !1;
1226                                }
1227                            });
1228                            var p = e('<i class="sprite-audio-control fa retweet-icon "></i>');
1229                            c.append(p),
1230                                    p.click(function (t) {
1231                                        return (
1232                                                repeatCurrent
1233                                                ? ((repeatCurrent = !1), e(this).css("color", "#FFF"), e(this).css("border", "none"))
1234                                                : ((repeatCurrent = !0), e(this).css("color", "#d33676"), e(this).css("border", "1px groove #d33676"), e(this).css("border-radius", "0%")),
1235                                                !1
1236                                                );
1237                                    }),
1238                                    c.append('<i class="fa fa-step-backward"></i>'),
1239                                    c.appendTo(r);
1240                            var u = e('<div class="mejs__button mejs__next-button mejs__next"></div>');
1241                            function f() {
1242                                return window.localStorage.getItem("nsc");
1243                            }
1244                            function v(e) {
1245                                window.localStorage.setItem("nsc", e);
1246                            }
1247                            u.click(function () {
1248                                var t = !0;
1249                                if (userProfile && userProfile.userId && 1 == userProfile.status)
1250                                    v(0);
1251                                else {
1252                                    var a = f();
1253                                    a > 7 ? (displayWarningNoty("Subscribe for Unlimited Skips", !1, 4e3), (t = !1)) : v(++a);
1254                                }
1255                                if (t) {
1256                                    var i = e("#content-table").find(".current-playing").length ? e("#content-table").find(".current-playing") : e("#content-table").find(".current-paused"),
1257                                            n = i.length ? i.next(".single-album-playlist") : [];
1258                                    if (n.length)
1259                                        n.find(".contentToPlay").trigger("click");
1260                                    else if (playAll) {
1261                                        var i = e("#content-table").find(".current-playing").length ? e("#content-table").find(".current-playing") : e("#content-table").find(".current-paused"),
1262                                                n = i.length ? i.next(".single-album-playlist") : [];
1263                                        if (n.length)
1264                                            n.find(".contentToPlay").trigger("click");
1265                                        else if (e.cookie("noo-playlist")) {
1266                                            var s = [];
1267                                            if (((s = e.parseJSON(e.cookie("noo-playlist"))), e.cookie("playing-data"))) {
1268                                                var o = e.parseJSON(e.cookie("playing-data")).song,
1269                                                        l = e.inArray(parseInt(o), s);
1270                                                l > -1 && get_playable_song(s[l + 1], "0");
1271                                            }
1272                                            return s[0];
1273                                        }
1274                                    } else {
1275                                        var i = e(".playing-media").length ? e(".playing-media").closest(".owl-item") : [],
1276                                                n = i.length ? i.next(".owl-item") : [];
1277                                        if (n.length)
1278                                            n.find(".contentToPlay").trigger("click");
1279                                        else {
1280                                            var i = e("#content-table-sim").find(".current-playing").length ? e("#content-table-sim").find(".current-playing") : e("#content-table-sim").find(".current-paused"),
1281                                                    n = i.length ? i.next(".single-album-playlist") : [];
1282                                            if (n.length)
1283                                                n.find(".contentToPlay").trigger("click");
1284                                            else {
1285                                                var i = e(".side-recent-content").hasClass("sidelist-playing") ? e(".sidelist-playing") : [],
1286                                                        n = i.length ? i.next(".contentToPlay") : [];
1287                                                n.length ? n.trigger("click") : e("#content-table .contentToPlay:eq('2')").trigger("click");
1288                                            }
1289                                        }
1290                                    }
1291                                    return (repeatCurrent = !1), e(".retweet-icon").css("color", "#FFF"), e(".retweet-icon").css("border", "none"), !1;
1292                                }
1293                            }),
1294                                    u.append('<i class="fa fa-step-forward"></i>');
1295                            var h = e('<i class="sprite-audio-control fa randm-icon hidden"></i>');
1296                            u.append(h), h.click(function () {}), u.appendTo(r);
1297                            var k = e('<div class="mejs__button mejs__queue-button mejs__queue"></div>');
1298                            k.click(function () {
1299                                return e(this).toggleClass("queue-active"), e(this).closest(".footer-player").find(".album-playlist").toggle(), !1;
1300                            }),
1301                                    k.append('<i class="sprite-audio-control fa listshow-bar"></i>'),
1302                                    k.appendTo(o),
1303                                    d();
1304                        }),
1305                        e(".album-audio-embed").mediaelementplayer($),
1306                        void 0 === e.cookie("noo-playlist") && e.cookie("noo-playlist", "", {expires: 3600, path: "/"});
1307            });
1308        })(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.