Previewing media item interferes with live media item

Bug #1022053 reported by Phill on 2012-07-07
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenLP
Medium
Tim Bentley

Bug Description

When previewing a media item, as well as sending a media item live, the live view takes over the control of progress bar of the preview view.

This can be seen by:
Send a media item to preview. Press play on the preview controller.
Send the item live and press play/pause/stop and observe the preview and live progress bars

Windows 7 Using VLC back end.

Related branches

summary: - Previewing media item inter-fears with live media item.
+ Previewing media item interferes with live media item.
summary: - Previewing media item interferes with live media item.
+ Previewing media item interferes with live media item
Tim Bentley (trb143) wrote :

This will be fixed in the re-factoring

Changed in openlp:
status: New → Confirmed
importance: Undecided → Medium
rimach (crichter) on 2012-09-19
tags: added: media
Tim Bentley (trb143) on 2012-09-19
Changed in openlp:
milestone: none → 2.1.1
assignee: nobody → Tim Bentley (trb143)
Tim Bentley (trb143) on 2014-11-02
Changed in openlp:
milestone: 2.1.1 → none
Tim Bentley (trb143) on 2014-11-02
Changed in openlp:
assignee: Tim Bentley (trb143) → nobody
Phill (phill-ridout) wrote :

This still affects 2.2, although, I only observed the stop button affecting both.

Tim Bentley (trb143) on 2015-01-26
Changed in openlp:
milestone: none → 2.1.3
Changed in openlp:
status: Confirmed → Fix Committed
Tim Bentley (trb143) on 2015-02-21
Changed in openlp:
status: Fix Committed → Fix Released
Phill (phill-ridout) wrote :

Trunk r2513 AKA 2.1.3
Ubuntu 14.10 using webkit player (although looking at the code this should be an issue on all platforms with all player backends)

Select video in mediamanager and send to preview and to live.
The videos start playing
Press pause on the preview:
-the preview video pauses
-the live video carries on playing
-both preview and live sliders stop moving

Press play on the preview:
- the preview starts playing
- both sliders move to the current position

Press Stop on the preview:
- Preview video stops playing
- Live video starts again, but carries on playing
- Both sliders move to the beginning
- Preview Pause Button changes to a play button and the stop button disapears
-Live pause button changes to play button

Phill (phill-ridout) wrote :

I have looked at the code and tried to fix it, but it is far to involved for me and I end up getting stuck. It may be best put off until after 2.4.

The key reason for this behaviour is:

openlp/core/ui/media/mediacontroller.py:174:
Creates a dict of media players from the backends. Each back-end is instantiated The dict looks like this:
    {'vlc': <openlp.core.ui.media.vlcplayer.VlcPlayer object at 0x7f4410913f28>,
    'phonon': <openlp.core.ui.media.phononplayer.PhononPlayer object at 0x7f4410913ef0>,
    'webkit': <openlp.core.ui.media.webkitplayer.WebkitPlayer object at 0x7f4410913eb8>}

openlp/core/ui/media/mediacontroller.py:532 & openlp/core/ui/media/mediacontroller.py:537:
Adds the instace of the media player with a key (1 for preview & 0 for live)

After starting OpenLP and sending a video to preview, the dict looks like this:
    {1: <openlp.core.ui.media.webkitplayer.WebkitPlayer object at 0x7fef5572ae10>}

Then after sending the video to live, the dict looks like this (notice that the live and preview players are the same object):
    {0: <openlp.core.ui.media.webkitplayer.WebkitPlayer object at 0x7fef5572ae10>,
    1: <openlp.core.ui.media.webkitplayer.WebkitPlayer object at 0x7fef5572ae10>}

So in the case of webkit when the pause button is clicked (openlp.core.ui.media.webkitplayer.WebkitPlayer#pause), the code :
    display.frame.evaluateJavaScript('show_video("pause");')

is excuted, because this is based on display (which is a different object for preview and live) the video in the correct controller is affected.
However when the state of the player is updated with:
    self.state = self.state = MediaState.Paused

 both players states are updated (because they are the same object).

Changed in openlp:
status: Fix Released → Triaged
milestone: 2.1.3 → none
Changed in openlp:
milestone: none → 2.3.0
Daniel Borges (danielborges93) wrote :

When both videos are playing this problem occurs.

I spotted these errors:
1. If the preview video stop first, the live video start again;
2. If the live video stop first, the preview video start again;
3. Pressing the stop button happens the same (as spoken earlier by Phill);
4. All the problems with the slider mentioned in others comments (as spoken earlier by Phill).

THE TEMPORARY SOLUTION:
Always stop the preview before to move to live.

SCENARIO:
1. Operating System: Ubuntu Studio 14.04.2 (in a virtual machine);
2. OpenLP version: 2.1.5.

Tim Bentley (trb143) on 2015-10-30
Changed in openlp:
milestone: 2.3.0 → none
status: Triaged → Confirmed
assignee: nobody → Tim Bentley (trb143)
Tim Bentley (trb143) on 2016-02-14
Changed in openlp:
status: Confirmed → In Progress
Tim Bentley (trb143) on 2016-04-15
Changed in openlp:
milestone: none → 2.5.2
milestone: 2.5.2 → 2.5.1
status: In Progress → Fix Committed
Tim Bentley (trb143) on 2017-05-31
tags: removed: media
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers