Skip to content

Fix editor not playing audio due to video order#1376

Merged
Arnei merged 1 commit intoopencast:mainfrom
Arnei:fix-audio-not-playing
Aug 16, 2024
Merged

Fix editor not playing audio due to video order#1376
Arnei merged 1 commit intoopencast:mainfrom
Arnei:fix-audio-not-playing

Conversation

@Arnei
Copy link
Copy Markdown
Member

@Arnei Arnei commented Jun 3, 2024

If the editor has multiple videos, it will consider one of them the "primary" video, from which it will play back audio. Even if that "primary" video does not have any audio.
This changes the logic so that the first video with audio the editor comes across is made the "primary" video, so that there should always be audio playing if audio is available.

If the editor has multiple videos, it will consider
one of them the "primary" video, from which it will
play back audio. Even if that "primary" video does
not have any audio.
This changes the logic so that the first video
with audio the editor comes across is made the
"primary" video, so that there should always
be audio playing if audio is available.
@Arnei Arnei added the type:bug Something isn't working label Jun 3, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2024

This pull request is deployed at test.editor.opencast.org/1376/2024-06-03_07-55-19/ .
It might take a few minutes for it to become available.

@snoesberger
Copy link
Copy Markdown
Contributor

I tested it with a dual stream recording where I had problems before. I can now hear the audio in the cutting section of the editor, but I still have the problem in the preview player of the subtitles section.

@Arnei
Copy link
Copy Markdown
Member Author

Arnei commented Jun 6, 2024

The video player in the subtitle section should be completely unaffected by this change.

The subtitle section only displays one video at a time and thus, only the audio from the currently selected video is played. If the video has no audio, then no audio will be played. Not sure if this can be fixed, but this PR at least is not trying to do anything about it, so I would consider it a separate issue.

@snoesberger
Copy link
Copy Markdown
Contributor

The video player in the subtitle section should be completely unaffected by this change.

The subtitle section only displays one video at a time and thus, only the audio from the currently selected video is played. If the video has no audio, then no audio will be played. Not sure if this can be fixed, but this PR at least is not trying to do anything about it, so I would consider it a separate issue.

You are right, this makes sense. But I can see how it might be confusing for some of our users. But for now, let's leave it as you suggested (and rethink if there's a better way to handle this, I have opened the following issue for that: #1380).

@snoesberger
Copy link
Copy Markdown
Contributor

I'd love to see this PR merged. Or is there still something preventing it from being merged?

@Arnei
Copy link
Copy Markdown
Member Author

Arnei commented Aug 12, 2024

This still needs a formal review I'd say.

Copy link
Copy Markdown
Contributor

@snoesberger snoesberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As GitHub Actions has already discovered, selectVideoURL is no longer used and could be removed from the import.
Otherwise, the code changes look reasonable to me, and my tests with different dual stream recordings were successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants