56 | | Since repainting the scene by grabbing the current frame from the player should be forced we should add a Timer which will repaint the SimpleSceneVisual's swing component if there is a video content in this scene and it's playing. |
57 | | The timer instance will reside in SimpleSceneVisual because it needs access to the swingComponent() property. |
58 | | The Timer instance will be in SimpleSceneVisual and it will update (force redraw) the scene 15 times in a second. The update will happen only if there's a runnig video. To understand if there's a running video use the following approach : |
59 | | * Take the scene elements |
60 | | * If there's a MediaSceneElement take the media state |
61 | | * If the media is playing the scene sould be updated |
| 56 | We need to now the MediaState throughout media's playing (useful for buttons' appearance and slide bar) and the scene should also repaint while media is playing (for videos). |
| 57 | * Video is providing ImmImages that are drawn while playing. We should force manually the Scene to obtain these images. |
| 58 | * The MediaState should also be kept somewhere and the storing of the MediaState should also go forced manually. |
| 59 | To create this functionality we should use a Timer which will set the MediaState and kept the Scene in sync. There will be a single Timer that iterates over the media players and sets the media state for every one of them. |
| 60 | * Create a class PlayerEntry that is a descendant of BaseProObject and it will be a class representing an entry for the player registry. It should keep consistent media ID, player and MediaState. The media sate should be updated manually so that it stays consistent with the current state of the player. The player registry HashMap should be changed to a ProList containing player entries. The MediaState will be set by the Timer. |
| 61 | The Timer instance will be in JMFVideoEngine and it will update (force redraw of the Scene and change the MediaState of every PlayerEntry) 15 times in a second. The update will happen only if there's a runnig video. |
| 62 | * We should iterate over the player entries and set the state for every player. |
| 63 | * In the SimpleSceneVisual we should take the current state for every VideoSceneElement which is also the media id for the video it displays. |