If a key request was outstanding when the media playlist changed, the call to fetchKeys() for the new playlist would be ignored. This caused segments to get stuck in drainBuffer() waiting for their keys. Now, we abort key requests as soon as we change media and immediately try to fetch the keys for the new playlist.
Used an adaptive, encrypted m3u8 on the example page and included hex dump utilities. Fixed formatting issues with the hex dump utility. Passed a 16-byte IV to the decrypter in drainBuffer(). Swapped byte order for the keys so they are not misintrepreted as little-endian. Added fields to the muxer test page to mux encrypted segments. Updated tests. Fixed docs on using openssl to test encryption and decryption.
playistloaded kicks off the key fetching mechanism for the whole
playlist.
If keys cannot be downloaded after two retries, the segment is skipped.
Keylime pie for everyone.
Enhance ParseStream to recognize and parse #EXT-X-KEY lines. Update Parser to track a currently active key and annotate each segment with the parsed key information. Added test cases and an example encrypted playlist.
Generalize the decryption function to use the initialization vector and decrypt multiple four-word sequences using cipher block chaining. Add a utility function to convert ASCII bytes to strings to clean up the test cases a bit.
Typed arrays are used extensively in repackaging segments. Make sure the tech doesn't load on platforms they're not available on (e.g. IE8). Fixes#137.
Bump the required version of video.js up to 4.7.2 because the earlier version built the SWF for a version of Flash that had issues with appendBytes. Handle autoplay inside the tech itself because video.js support calls play before the Media Source has opened and the call ended up ignored. Fixes#112. Fixes#128.
When the last segment in a playlist is appended, call endOfStream. There was an off-by-one error calculating when the final segment was delivered. Mock out endOfStream for test cases so exceptions aren't thrown. For #111. This commit stops the spinner from showing up when a video has finished but hitting play again to restart the video is not currently working.
The Flash decoder expects the FLV timestamp to be the decoding timestamp not the
presentation timestamp. Using pts creates noticable bugs when using a
non-baseline H264 profile.
The HLS tech waits until `ready` before setting the source to be sure that Flash has time to finish loading. If a user changed the src and triggered a tech unload before that time, the ready handler would be invoked, throw an exception, and leave the tech in a transitionary state. Instead, double check that the object element is still alive before setting the src in the `ready` handler.
for-in returns all enumerable properties on String, which fails for iteration
when people set enumerable properties on String (not that this is a good
idea). Using the normal for loop is probably faster, too.
Keep track of total content bytes received and make it accessible from outside the tech. Trigger an event whenever a new playlist is activated. For #93.