-
Notifications
You must be signed in to change notification settings - Fork 26
/
PlayerLoadEvent.hx
31 lines (30 loc) · 1.27 KB
/
PlayerLoadEvent.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// WAV/AU Flash player with resampler
//
// Copyright (c) 2009, Anton Fedorov <[email protected]>
//
/* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*/
// Events, fired by Player to notify about it state
class PlayerLoadEvent extends PlayerEvent {
static public inline var LOAD : String = "PLAYER_LOAD";
public var SecondsLoaded : Float;
public var SecondsTotal : Float;
public function new(type : String, ?bubbles : Bool, ?cancelable : Bool, SecondsLoaded: Float, SecondsTotal: Float) {
super(type, bubbles, cancelable);
this.SecondsLoaded = SecondsLoaded;
this.SecondsTotal = SecondsTotal;
}
public override function toString(): String {
var res = super.toString();
return res.substr(0, res.length-1)+" SecondsLoaded="+SecondsLoaded+" SecondsTotal="+SecondsTotal+"]";
}
}