Skip to content

Commit e3cf46e

Browse files
rtrittoyoriiis
authored andcommitted
Move setSource method from player core to html5 provider
1 parent 1f5dbb8 commit e3cf46e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/core/player.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,6 @@ export default abstract class Player {
472472
this.methodSeekTo(newTime)
473473
}
474474

475-
/**
476-
* Set the media source
477-
* @param source New media source URL
478-
*/
479-
setSource(source: string) {
480-
this.media.src = source
481-
this.media.load()
482-
}
483-
484475
/**
485476
* Request the fullscreen
486477
*/

src/providers/html5/html5.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ export default function Html5Provider(Player: any) {
5757
})
5858
}
5959

60+
/**
61+
* Set the media source
62+
* @param source New media source URL
63+
*/
64+
setSource(source: string) {
65+
this.media.src = source
66+
this.media.load()
67+
}
68+
6069
/**
6170
* Create event listeners
6271
* All listeners are created on class properties to facilitate the deletion of events

0 commit comments

Comments
 (0)