Skip to content
Snippets Groups Projects
Commit 74384469 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Cleanup ContentPlayerViewController

parent 4c11df75
Branches
Tags
No related merge requests found
...@@ -87,15 +87,16 @@ class ContentPlayerViewController extends NVC { ...@@ -87,15 +87,16 @@ class ContentPlayerViewController extends NVC {
} }
def configurePlayers(configuration: PlayerInstanceConfiguration): Unit = { def configurePlayers(configuration: PlayerInstanceConfiguration): Unit = {
val parent = getParent.asInstanceOf[Pane]
parent.getChildren.clear()
mediaPlayers.clear() mediaPlayers.clear()
configuration.instances.forEach(player => { configuration.instances.forEach(player => {
mediaPlayers.addOne(new MediaPlayerStack(player)) val mediaPlayerStack = new MediaPlayerStack(player)
mediaPlayers.addOne(mediaPlayerStack)
parent.getChildren.add(mediaPlayerStack)
}) })
val parent = getParent.asInstanceOf[Pane]
parent.getChildren.clear()
mediaPlayers.foreach(player => parent.getChildren.add(player))
getStageContainer.ifPresent(container => { getStageContainer.ifPresent(container => {
val stage = container.getStage val stage = container.getStage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment