PageSourceSearch

https://quaibranly.fr/typo3conf/ext/mqb_base/Resources/Public/Mont…/_components/medias-audio.js?1776327123

js quaibranly.fr collected 2026-10-02 02:55:23 UTC 3,009 bytes, 125 lines download raw bytes

1var APP = APP || {};
2
3(function()
4{
5	"use strict";
6
7	APP.MediasAudio = APP.MediasComponentAbstract.extend(
8	{
9		defaults : {
10
11		},
12
13		init : function(options, $container,type)
14		{
15			this._super(options,$container,type);
16
17			this.$.player		= this.$.container.find(".player-audio");
18			this.$.audioContainer = this.$.container.find(".ctn-audio");
19			this.playerAudio	 = null;
20		},
21
22		/* ------------------------------------------------- */
23		/* ---  public start */
24		/* ------------------------------------------------- */
25		start : function()
26		{
27			this._super();
28			this.initControlsPlayer();
29		},
30
31		/* ------------------------------------------------- */
32		/* ---  public resize */
33		/* ------------------------------------------------- */
34		resize : function()
35		{
36			this._super();
37			if (this.playerAudio!==null)
38				this.playerAudio.resize();
39		},
40
41		/* ------------------------------------------------- */
42		/* ---  public remove */
43		/* ------------------------------------------------- */
44		remove : function()
45		{
46			this.clearMedia();
47			this._super();
48		},
49
50		/* ------------------------------------------------- */
51		/* ---  public clearMedia */
52		/* ------------------------------------------------- */
53		clearMedia : function()
54		{
55			this._super();
56			if (this.playerAudio!==null)
57			{
58				this.playerAudio.remove();
59			}
60		},
61
62		/* ------------------------------------------------- */
63		/* ---  protected reset */
64		/* ------------------------------------------------- */
65		reset : function()
66		{
67			this._super();
68			this.$.player = this.$.container.find(".player-audio");
69			this.$.audioContainer = this.$.container.find(".ctn-audio");
70		},
71
72		/* ------------------------------------------------- */
73		/* ---  private initControlsPlayer */
74		/* ------------------------------------------------- */
75		initControlsPlayer : function()
76		{
77			var that = this;
78
79			this.$.overlayMedia.on("click", function(event)
80			{
81				event.preventDefault();
82				var $el = $(this);
83
84				console.log($el);
85
86				$el.find(".bt-play").addClass("hidden");
87				that.$.player.addClass("visible");
88
89				that.initPlayerPosition();
90				that.initPlayerAudio(that.$.player);
91			});
92		},
93
94
95		/* ------------------------------------------------- */
96		/* ---  private initPlayerAudio */
97		/* ------------------------------------------------- */
98		initPlayerAudio : function($player)
99		{
100			this.playerAudio = new APP.VideoJsPlayer(
101				{
102					id : $player.find('audio').attr("id"),
103				},$player
104			);
105		},
106
107		/* ------------------------------------------------- */
108		/* ---  private initPlayerPosition */
109		/* ------------------------------------------------- */
110		initPlayerPosition : function()
111		{
112			var that = this;
113
114			that.$.audioContainer.on({
115				mouseleave : function(){
116					TweenLite.to(that.$.player, 0.3, {bottom: -that.$.player.height()+"px", ease: Sine.easeOut });
117				},
118				mouseenter : function(){
119					TweenLite.to(that.$.player, 0.3, {bottom:0, ease: Sine.easeOut });
120				}
121			});
122		}
123
124	});
125 }());

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.