-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add flash engine #2
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
56412bb
add code
45d05ff
udpate
ad18811
add playback rate
5ca4d28
review fixes
c05d0bc
chore: prettier configuration
52218e0
chore: prettier fixes
356c8c2
fix review +flow + getLogger from playkit-js
545b308
remove capping and move to currentLevel param
0cc9d02
use the adapter promise
7eaab44
change the api load to promise
355bd7e
fix(FEC-8435,FEC-8437): add muted state and add empty hideTextTrack t…
d3799d5
fix(FEC-8441): after end event send time update
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ class Flash extends FakeEventTarget implements IEngine { | |
|
||
_srcToLoad: ?string; | ||
|
||
_muted: boolean; | ||
|
||
/** | ||
* The Flash class logger. | ||
* @type {any} | ||
|
@@ -127,6 +129,9 @@ class Flash extends FakeEventTarget implements IEngine { | |
this._init(source, config); | ||
} | ||
|
||
hideTextTrack(): void { | ||
|
||
} | ||
_init(source: PKMediaSourceObject, config: Object): void { | ||
this._eventManager = new EventManager(); | ||
|
||
|
@@ -414,9 +419,13 @@ class Flash extends FakeEventTarget implements IEngine { | |
* @returns {void} | ||
*/ | ||
set volume(vol: number): void { | ||
this._volume = vol; | ||
if (this._api) { | ||
this._api.volume(vol); | ||
if (this._muted) { | ||
this._volumeBeforeMute = vol; | ||
} else { | ||
this._volume = vol; | ||
if (this._api) { | ||
this._api.volume(vol); | ||
} | ||
} | ||
} | ||
|
||
|
@@ -515,9 +524,11 @@ class Flash extends FakeEventTarget implements IEngine { | |
*/ | ||
set muted(mute: boolean): void { | ||
if (mute) { | ||
this._volumeBeforeMute = this.volume; | ||
this.volume = 0; | ||
this._muted = true; | ||
this._volumeBeforeMute = this.volume; | ||
} else { | ||
this._muted = false; | ||
if (this._volumeBeforeMute) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could be |
||
this.volume = this._volumeBeforeMute; | ||
} else { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is in the flow typings - didn't it alert you on missing interface?