Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

The FORCED attribute present when the TYPE is not SUBTITLES #58

Open
aapcuk opened this issue Nov 28, 2017 · 1 comment
Open

The FORCED attribute present when the TYPE is not SUBTITLES #58

aapcuk opened this issue Nov 28, 2017 · 1 comment

Comments

@aapcuk
Copy link

aapcuk commented Nov 28, 2017

According to the HLS specification, also linked in the documentation, the FORCED attribute should only be present with subtitles: "The FORCED attribute MUST NOT be present unless the TYPE is SUBTITLES."
https://tools.ietf.org/html/draft-pantos-http-live-streaming-16

However, when writing an m3u8 file, it is present with audio as well:
#EXT-X-MEDIA:LANGUAGE="eng",AUTOSELECT=YES,FORCED=NO,TYPE=AUDIO,URI="...",GROUP-ID="audio_aac",DEFAULT=YES,NAME="eng"

Version: 0.2.6

@aapcuk
Copy link
Author

aapcuk commented Nov 29, 2017

I think the solution is simply changing the containsAttribute() for Constants.FORCED in MasterPlaylistTagWriter.java:

HANDLERS.put(Constants.FORCED, new AttributeWriter<MediaData>() {
    @Override
    public boolean containsAttribute(MediaData mediaData) {
        return mediaData.getType() == MediaType.SUBTITLES;
    }
    // ...
});

(I couldn't yet made a pull request, I'm new here.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant