Skip to content

Instantly share code, notes, and snippets.

@jpgls
Last active August 29, 2015 14:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpgls/cd0997db346625a7ee4e to your computer and use it in GitHub Desktop.
Save jpgls/cd0997db346625a7ee4e to your computer and use it in GitHub Desktop.
HLS Alternate Audio Tracks - iOS7 vs. iOS8

Changes to HLS Alternate Audio Tracks

iOS7 vs. iOS8

Since iOS 8 went live on Friday and I updated a few of my devices over the weekend, I decided to do some quick testing of web video playback. Wanted to see if there were any little, undocumented changes that would affect REPlayer, or our general approach to HTML video - like the changes to exiting fullscreen video that came in the update from iOS6->iOS71.

Overall, things seem pretty much the same between iOS7->iOS8, and in a quick runthrough, REPlayer looks to be working just fine.

One interesting change to note though, is that the native interface (iOS default controls used when video is fullscreen) for selecting Sub-Title/CC tracks - or Alternate Audio tracks when they're available - no longer seems to recognize/display the audio tracks in iOS8.

Sub-Title selection still works just fine, but the Audio Section (and Audio Tracks) do not display in iOS8. Confirmed that the testing m3u8 still contains Alternate Audio tracks in the manifest. Viewing the same video on a device running iOS7 will display, and allow the selection of, both Sub-Title and Audio Tracks, while iOS8 will only display the subtitle tracks.

Off the bat, I'm assuming this is a bug, not a feature, and it will be addressed in future updates, though it could also be a result of the transition from QTKit to AVFoundation as the new iOS Media Framework2. One other possible cause for the discrepancy, is the different versions of WebKit used between the two3.


Notes and non sequiturs
1
**In iOS6** - when you switched to fullscreen video, there were 2 options available for exiting fullscreen: * One was to tap the "Exit Fullscreen" icon in the lower right side of the control bar (Two arrows on a diagonal that were pointing inwards towards each other - the inverse of the icon used to enter fullscreen) * This would exit fullscreen, and maintain the current playback state of the video, i.e., if the video was playing in fullscreen, it would continue to be playing after leaving fullscreen - if the video was paused in fullscreen, it would remain paused after leaving fullscreen * The other was to tap on the text-button "DONE" in the upper left of the fullscreen interface * This would exit fullscreen and pause the video, regardless of current playback state

In iOS7 - the "Exit Fullscreen" icon was removed, and the only option was to use "DONE" - this meant that whenever you exited fullscreen in iOS7, the video would be paused every time. Meaning that an extra tap on the Play Button was necessary in order to resume playback.

2
AVFoundation was added in iOS 7 and existed alongside QTKit, though developers were strongly encouraged to make the switch - Have not yet found explicit documentation of the status/availability of QTKit in iOS8
3
* User Agent String of an iPhone 5S running iOS __8.0__ reports WebKit _v600.1.4_ * Full User Agent String - `Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A365 Safari/600.1.4`
  • User Agent String of an iPhone 5S running iOS 7.1 reports WebKit v537.51.2
    • Full User Agent String -
      Mozilla/5.0 (iPhone; CPU iPhone OS 7_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D167 Safari/9537.53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment