Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching between subtitles doesn't work (English -> None -> English) #296

Closed
1 task
ziem opened this issue Apr 5, 2023 · 3 comments
Closed
1 task

Switching between subtitles doesn't work (English -> None -> English) #296

ziem opened this issue Apr 5, 2023 · 3 comments
Assignees
Labels

Comments

@ziem
Copy link

ziem commented Apr 5, 2023

Media3 Version

Media3 1.0.0

Devices that reproduce the issue

  • Pixel 5 (Android 13)
  • OnePlus 10 Pro 5G

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

In the demo-session project inside MediaItemTree class comment out .setSubtitleConfigurations(subtitleConfigurations) (line 88).

  1. Play https://d3rlna7iyyu8wu.cloudfront.net/skip_armstrong/skip_armstrong_stereo_subs.m3u8 in the demo app (demo-session)
  2. Click subtitles button (cc)
  3. Select None
  4. Click subtitles button again
  5. Select English

Expected result

English subtitles should appear and be selected

Actual result

English subtitles doesn't appear

Media

https://d3rlna7iyyu8wu.cloudfront.net/skip_armstrong/skip_armstrong_stereo_subs.m3u8 (found on the internet)

Bug Report

  • You will email the zip file produced by adb bugreport to [email protected] after filing this issue.
@tonihei tonihei self-assigned this Apr 5, 2023
@tonihei
Copy link
Collaborator

tonihei commented Apr 5, 2023

Thanks for reporting! This is caused by stripping some metadata from the subtitle format and as a result the player can't find the track you selected.

@ziem
Copy link
Author

ziem commented Apr 5, 2023

Is there any workaround I could use to fix this issue?

rohitjoins pushed a commit that referenced this issue Apr 13, 2023
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

#minor-release

Issue: #296
PiperOrigin-RevId: 523986626
rohitjoins pushed a commit to google/ExoPlayer that referenced this issue Apr 13, 2023
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

#minor-release

Issue: androidx/media#296
PiperOrigin-RevId: 523986626
rohitjoins pushed a commit that referenced this issue Apr 13, 2023
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

#minor-release

Issue: #296
PiperOrigin-RevId: 523986626
rohitjoins pushed a commit to google/ExoPlayer that referenced this issue Apr 13, 2023
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

#minor-release

Issue: androidx/media#296
PiperOrigin-RevId: 523986626
rohitjoins pushed a commit that referenced this issue Apr 18, 2023
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

Issue: #296
PiperOrigin-RevId: 523986626
(cherry picked from commit 1c557e2)
rohitjoins pushed a commit to google/ExoPlayer that referenced this issue Apr 18, 2023
The overrides specified by a MediaController may not use the exact
same TrackGroup instances as known to the Player because the groups
have been bundled to and from the controller. This bundling may
alter the instance slightly depending on the version used on each
side of the communication and the fields set (e.g. Format.metadata
is not supported for bundling).

This issue can be solved by creating unique track group ids for
each group on the session side before bundling. On the way back,
the groups in the track selection parameters can be mapped backed
to their original instances based on this id.

#minor-release

Issue: androidx/media#296
PiperOrigin-RevId: 523986626
(cherry picked from commit 07707c2)
@ziem
Copy link
Author

ziem commented Apr 26, 2023

v1.0.1 fixes the issue, thanks 👍

@ziem ziem closed this as completed Apr 26, 2023
@androidx androidx locked and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants