You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2307 lines
78 KiB

Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Simplified fetch algorithm as much as possible (#875) Fixed seeking behavior Updated getMediaIndexForTime to be simple and stupid Remove spurious console logs Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior. Remove limits on gap-skipper. Skip instantly without waiting. Use the proper native MediaSource duration for buffer removals. Improvements for live stream rendition changes Fixed an undefined variable bug Some more simplification and a very conservative live stream rendition change approach VOD fixes Experimental change to the way we throttle the fetcher Use GOAL_BUFFER_LENGTH again Continued massive changes to segment fetching. Cleanup and comments. Fixed a bug where we were fetching starting at mediaIndex 0 on every seek. Refactor probing code in preparation for pulling into it's own module or class Moved sync-related logic out of segment-loader and into a new sync-controller class Removed expired from the SegmentLoader Update mux.js dependency to 2.5.0 Don't error when the tsprobe returns null Fixed two issues: MAAT switching and Flash seeking Rename duration variable fix flash failing first segment load (#859) dont use tech for has played (#861) Code Coverage and Unit tests for Simple Fetcher (#862) fix has played returning false on vod (#866) Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878) Provide option to set contrib-hls first in the HTML5 tech (#889) This reverts commit 59ddbe1188c0b4a1d55d63fa7a334174001fbd28. Add playback tests (#894) Fixed MSE and environment test helpers, restore properly Removed unused test files remove expired time tracking and use sync points to calculate seekable (#898) Fixing a few tests for QUnit 2.0
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
Fmp4 support (#829) * Media init segment support Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader. * Basic support for fragmented MP4 playback Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0. * Finish consolidating audio loaders Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow. * Detect and set the correct starting timestamp offset Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification. * Guard against media playlists without bandwidth information If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing. * Add stub prog_index.m3u8 for tests Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error. * Abort init segment XHR alongside other segment XHRs If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes. * Fix audio track management after reorganization Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change. * Fix D3 on stats page Update URL for D3. Remove audio switcher since it's included by default now. * Only override codec defaults if an actual value was parsed When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested. * IE fixes Array.prototype.find() isn't available in IE so use .filter()[0] instead. * Blacklist unsupported codecs If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
9 years ago
  1. import QUnit from 'qunit';
  2. import videojs from 'video.js';
  3. import {
  4. useFakeEnvironment,
  5. useFakeMediaSource,
  6. createPlayer,
  7. standardXHRResponse,
  8. openMediaSource
  9. } from './test-helpers.js';
  10. import manifests from './test-manifests.js';
  11. import {
  12. MasterPlaylistController,
  13. mimeTypesForPlaylist_,
  14. mapLegacyAvcCodecs_
  15. } from '../src/master-playlist-controller';
  16. /* eslint-disable no-unused-vars */
  17. // we need this so that it can register hls with videojs
  18. import { Hls } from '../src/videojs-contrib-hls';
  19. /* eslint-enable no-unused-vars */
  20. import Playlist from '../src/playlist';
  21. import Config from '../src/config';
  22. const generateMedia = function(isMaat, isMuxed, hasVideoCodec, hasAudioCodec, isFMP4) {
  23. const codec = (hasVideoCodec ? 'avc1.deadbeef' : '') +
  24. (hasVideoCodec && hasAudioCodec ? ',' : '') +
  25. (hasAudioCodec ? 'mp4a.40.E' : '');
  26. const master = {
  27. mediaGroups: {},
  28. playlists: []
  29. };
  30. const media = {
  31. attributes: {}
  32. };
  33. if (isMaat) {
  34. master.mediaGroups.AUDIO = {
  35. test: {
  36. demuxed: {
  37. uri: 'foo.bar'
  38. }
  39. }
  40. };
  41. if (isMuxed) {
  42. master.mediaGroups.AUDIO.test.muxed = {};
  43. }
  44. media.attributes.AUDIO = 'test';
  45. }
  46. if (isFMP4) {
  47. // This is not a great way to signal that the playlist is fmp4 but
  48. // this is how we currently detect it in HLS so let's emulate it here
  49. media.segments = [
  50. {
  51. map: 'test'
  52. }
  53. ];
  54. }
  55. if (hasVideoCodec || hasAudioCodec) {
  56. media.attributes.CODECS = codec;
  57. }
  58. return [master, media];
  59. };
  60. QUnit.module('MasterPlaylistController', {
  61. beforeEach(assert) {
  62. this.env = useFakeEnvironment(assert);
  63. this.clock = this.env.clock;
  64. this.requests = this.env.requests;
  65. this.mse = useFakeMediaSource();
  66. // force the HLS tech to run
  67. this.origSupportsNativeHls = videojs.Hls.supportsNativeHls;
  68. videojs.Hls.supportsNativeHls = false;
  69. this.oldBrowser = videojs.browser;
  70. videojs.browser = videojs.mergeOptions({}, videojs.browser);
  71. this.player = createPlayer();
  72. this.player.src({
  73. src: 'manifest/master.m3u8',
  74. type: 'application/vnd.apple.mpegurl'
  75. });
  76. this.clock.tick(1);
  77. this.standardXHRResponse = (request, data) => {
  78. standardXHRResponse(request, data);
  79. // Because SegmentLoader#fillBuffer_ is now scheduled asynchronously
  80. // we have to use clock.tick to get the expected side effects of
  81. // SegmentLoader#handleUpdateEnd_
  82. this.clock.tick(1);
  83. };
  84. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  85. // Make segment metadata noop since most test segments dont have real data
  86. this.masterPlaylistController.mainSegmentLoader_.addSegmentMetadataCue_ = () => {};
  87. },
  88. afterEach() {
  89. this.env.restore();
  90. this.mse.restore();
  91. videojs.Hls.supportsNativeHls = this.origSupportsNativeHls;
  92. videojs.browser = this.oldBrowser;
  93. this.player.dispose();
  94. }
  95. });
  96. QUnit.test('throws error when given an empty URL', function(assert) {
  97. let options = {
  98. url: 'test',
  99. tech: this.player.tech_
  100. };
  101. assert.ok(new MasterPlaylistController(options), 'can create with options');
  102. options.url = '';
  103. assert.throws(() => {
  104. new MasterPlaylistController(options); // eslint-disable-line no-new
  105. }, /A non-empty playlist URL is required/, 'requires a non empty url');
  106. });
  107. QUnit.test('obeys none preload option', function(assert) {
  108. this.player.preload('none');
  109. // master
  110. this.standardXHRResponse(this.requests.shift());
  111. // playlist
  112. this.standardXHRResponse(this.requests.shift());
  113. openMediaSource(this.player, this.clock);
  114. assert.equal(this.requests.length, 0, 'no segment requests');
  115. // verify stats
  116. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  117. });
  118. QUnit.test('obeys auto preload option', function(assert) {
  119. this.player.preload('auto');
  120. // master
  121. this.standardXHRResponse(this.requests.shift());
  122. // playlist
  123. this.standardXHRResponse(this.requests.shift());
  124. openMediaSource(this.player, this.clock);
  125. assert.equal(this.requests.length, 1, '1 segment request');
  126. // verify stats
  127. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  128. });
  129. QUnit.test('obeys metadata preload option', function(assert) {
  130. this.player.preload('metadata');
  131. // master
  132. this.standardXHRResponse(this.requests.shift());
  133. // playlist
  134. this.standardXHRResponse(this.requests.shift());
  135. openMediaSource(this.player, this.clock);
  136. assert.equal(this.requests.length, 1, '1 segment request');
  137. // verify stats
  138. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  139. });
  140. QUnit.test('resets SegmentLoader when seeking in flash for both in and out of buffer',
  141. function(assert) {
  142. let resets = 0;
  143. // master
  144. this.standardXHRResponse(this.requests.shift());
  145. // media
  146. this.standardXHRResponse(this.requests.shift());
  147. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  148. let mpc = this.masterPlaylistController;
  149. let segmentLoader = mpc.mainSegmentLoader_;
  150. segmentLoader.resetEverything = function() {
  151. resets++;
  152. };
  153. let buffered;
  154. mpc.tech_.buffered = function() {
  155. return buffered;
  156. };
  157. buffered = videojs.createTimeRanges([[0, 20]]);
  158. mpc.mode_ = 'html5';
  159. mpc.setCurrentTime(10);
  160. assert.equal(resets, 0,
  161. 'does not reset loader when seeking into a buffered region in html5');
  162. mpc.setCurrentTime(21);
  163. assert.equal(resets, 1,
  164. 'does reset loader when seeking outside of the buffered region in html5');
  165. mpc.mode_ = 'flash';
  166. mpc.setCurrentTime(10);
  167. assert.equal(resets, 2,
  168. 'does reset loader when seeking into a buffered region in flash');
  169. mpc.setCurrentTime(21);
  170. assert.equal(resets, 3,
  171. 'does reset loader when seeking outside of the buffered region in flash');
  172. });
  173. QUnit.test('resyncs SegmentLoader for a fast quality change', function(assert) {
  174. let resyncs = 0;
  175. // master
  176. this.standardXHRResponse(this.requests.shift());
  177. // media
  178. this.standardXHRResponse(this.requests.shift());
  179. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  180. let segmentLoader = this.masterPlaylistController.mainSegmentLoader_;
  181. segmentLoader.resyncLoader = function() {
  182. resyncs++;
  183. };
  184. this.masterPlaylistController.selectPlaylist = () => {
  185. return this.masterPlaylistController.master().playlists[0];
  186. };
  187. this.masterPlaylistController.fastQualityChange_();
  188. assert.equal(resyncs, 1, 'resynced the segmentLoader');
  189. // verify stats
  190. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  191. });
  192. QUnit.test('does not resync the segmentLoader when no fast quality change occurs',
  193. function(assert) {
  194. let resyncs = 0;
  195. // master
  196. this.standardXHRResponse(this.requests.shift());
  197. // media
  198. this.standardXHRResponse(this.requests.shift());
  199. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  200. let segmentLoader = this.masterPlaylistController.mainSegmentLoader_;
  201. segmentLoader.resyncLoader = function() {
  202. resyncs++;
  203. };
  204. this.masterPlaylistController.fastQualityChange_();
  205. assert.equal(resyncs, 0, 'did not resync the segmentLoader');
  206. // verify stats
  207. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  208. });
  209. QUnit.test('fast quality change resyncs audio segment loader', function(assert) {
  210. this.requests.length = 0;
  211. this.player = createPlayer();
  212. this.player.src({
  213. src: 'alternate-audio-multiple-groups.m3u8',
  214. type: 'application/vnd.apple.mpegurl'
  215. });
  216. this.clock.tick(1);
  217. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  218. masterPlaylistController.selectPlaylist = () => {
  219. return masterPlaylistController.master().playlists[0];
  220. };
  221. // master
  222. this.standardXHRResponse(this.requests.shift());
  223. // media
  224. this.standardXHRResponse(this.requests.shift());
  225. masterPlaylistController.mediaSource.trigger('sourceopen');
  226. this.player.audioTracks()[0].enabled = true;
  227. let resyncs = 0;
  228. let resets = 0;
  229. let realReset = masterPlaylistController.audioSegmentLoader_.resetLoader;
  230. masterPlaylistController.audioSegmentLoader_.resetLoader = function() {
  231. resets++;
  232. realReset.call(this);
  233. };
  234. masterPlaylistController.audioSegmentLoader_.resyncLoader = () => resyncs++;
  235. masterPlaylistController.fastQualityChange_();
  236. assert.equal(resyncs, 0, 'does not resync the audio segment loader when media same');
  237. // force different media
  238. masterPlaylistController.selectPlaylist = () => {
  239. return masterPlaylistController.master().playlists[1];
  240. };
  241. assert.equal(this.requests.length, 1, 'one request');
  242. masterPlaylistController.fastQualityChange_();
  243. assert.equal(this.requests.length, 2, 'added a request for new media');
  244. assert.equal(resyncs, 0, 'does not resync the audio segment loader yet');
  245. // new media request
  246. this.standardXHRResponse(this.requests[1]);
  247. assert.equal(resyncs, 1, 'resyncs the audio segment loader when media changes');
  248. assert.equal(resets, 0, 'does not reset the audio segment loader when media changes');
  249. });
  250. QUnit.test('audio segment loader is reset on audio track change', function(assert) {
  251. this.requests.length = 0;
  252. this.player = createPlayer();
  253. this.player.src({
  254. src: 'alternate-audio-multiple-groups.m3u8',
  255. type: 'application/vnd.apple.mpegurl'
  256. });
  257. this.clock.tick(1);
  258. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  259. masterPlaylistController.selectPlaylist = () => {
  260. return masterPlaylistController.master().playlists[0];
  261. };
  262. // master
  263. this.standardXHRResponse(this.requests.shift());
  264. // media
  265. this.standardXHRResponse(this.requests.shift());
  266. masterPlaylistController.mediaSource.trigger('sourceopen');
  267. let resyncs = 0;
  268. let resets = 0;
  269. let realReset = masterPlaylistController.audioSegmentLoader_.resetLoader;
  270. masterPlaylistController.audioSegmentLoader_.resetLoader = function() {
  271. resets++;
  272. realReset.call(this);
  273. };
  274. masterPlaylistController.audioSegmentLoader_.resyncLoader = () => resyncs++;
  275. assert.equal(this.requests.length, 1, 'one request');
  276. assert.equal(resyncs, 0, 'does not resync the audio segment loader yet');
  277. this.player.audioTracks()[1].enabled = true;
  278. assert.equal(this.requests.length, 2, 'two requests');
  279. assert.equal(resyncs, 1, 'resyncs the audio segment loader when audio track changes');
  280. assert.equal(resets, 1, 'resets the audio segment loader when audio track changes');
  281. });
  282. QUnit.test('if buffered, will request second segment byte range', function(assert) {
  283. this.requests.length = 0;
  284. this.player.src({
  285. src: 'manifest/playlist.m3u8',
  286. type: 'application/vnd.apple.mpegurl'
  287. });
  288. this.clock.tick(1);
  289. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  290. // Make segment metadata noop since most test segments dont have real data
  291. this.masterPlaylistController.mainSegmentLoader_.addSegmentMetadataCue_ = () => {};
  292. // mock that the user has played the video before
  293. this.player.tech_.triggerReady();
  294. this.clock.tick(1);
  295. this.player.tech_.trigger('play');
  296. this.player.tech_.paused_ = false;
  297. this.player.tech_.played = () => videojs.createTimeRanges([[0, 20]]);
  298. openMediaSource(this.player, this.clock);
  299. // playlist
  300. this.standardXHRResponse(this.requests[0]);
  301. this.masterPlaylistController.mainSegmentLoader_.sourceUpdater_.buffered = () => {
  302. return videojs.createTimeRanges([[0, 20]]);
  303. };
  304. // 1ms has passed to upload 1kb
  305. // that gives us a bandwidth of 1024 / 1 * 8 * 1000 = 8192000
  306. this.clock.tick(1);
  307. // segment
  308. this.standardXHRResponse(this.requests[1]);
  309. this.masterPlaylistController.mainSegmentLoader_.fetchAtBuffer_ = true;
  310. this.masterPlaylistController.mediaSource.sourceBuffers[0].trigger('updateend');
  311. this.clock.tick(10 * 1000);
  312. this.clock.tick(1);
  313. assert.equal(this.requests[2].headers.Range, 'bytes=522828-1110327');
  314. // verify stats
  315. assert.equal(this.player.tech_.hls.stats.bandwidth, 8192000, 'Live stream');
  316. assert.equal(this.player.tech_.hls.stats.mediaRequests, 1, '1 segment request');
  317. assert.equal(this.player.tech_.hls.stats.mediaBytesTransferred,
  318. 1024,
  319. '1024 bytes downloaded');
  320. });
  321. QUnit.test('re-initializes the combined playlist loader when switching sources',
  322. function(assert) {
  323. openMediaSource(this.player, this.clock);
  324. // master
  325. this.standardXHRResponse(this.requests.shift());
  326. // playlist
  327. this.standardXHRResponse(this.requests.shift());
  328. // segment
  329. this.standardXHRResponse(this.requests.shift());
  330. // change the source
  331. this.player.src({
  332. src: 'manifest/master.m3u8',
  333. type: 'application/vnd.apple.mpegurl'
  334. });
  335. this.clock.tick(1);
  336. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  337. // Make segment metadata noop since most test segments dont have real data
  338. this.masterPlaylistController.mainSegmentLoader_.addSegmentMetadataCue_ = () => {};
  339. // maybe not needed if https://github.com/videojs/video.js/issues/2326 gets fixed
  340. this.clock.tick(1);
  341. assert.ok(!this.masterPlaylistController.masterPlaylistLoader_.media(),
  342. 'no media playlist');
  343. assert.equal(this.masterPlaylistController.masterPlaylistLoader_.state,
  344. 'HAVE_NOTHING',
  345. 'reset the playlist loader state');
  346. assert.equal(this.requests.length, 1, 'requested the new src');
  347. // buffer check
  348. this.clock.tick(10 * 1000);
  349. assert.equal(this.requests.length, 1, 'did not request a stale segment');
  350. // sourceopen
  351. openMediaSource(this.player, this.clock);
  352. assert.equal(this.requests.length, 1, 'made one request');
  353. assert.ok(
  354. this.requests[0].url.indexOf('master.m3u8') >= 0,
  355. 'requested only the new playlist'
  356. );
  357. });
  358. QUnit.test('updates the combined segment loader on live playlist refreshes',
  359. function(assert) {
  360. let updates = [];
  361. openMediaSource(this.player, this.clock);
  362. // master
  363. this.standardXHRResponse(this.requests.shift());
  364. // media
  365. this.standardXHRResponse(this.requests.shift());
  366. this.masterPlaylistController.mainSegmentLoader_.playlist = function(update) {
  367. updates.push(update);
  368. };
  369. this.masterPlaylistController.masterPlaylistLoader_.trigger('loadedplaylist');
  370. assert.equal(updates.length, 1, 'updated the segment list');
  371. // verify stats
  372. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  373. });
  374. QUnit.test(
  375. 'fires a progress event after downloading a segment from combined segment loader',
  376. function(assert) {
  377. let progressCount = 0;
  378. openMediaSource(this.player, this.clock);
  379. // master
  380. this.standardXHRResponse(this.requests.shift());
  381. // media
  382. this.standardXHRResponse(this.requests.shift());
  383. this.player.tech_.on('progress', function() {
  384. progressCount++;
  385. });
  386. // 1ms has passed to upload 1kb
  387. // that gives us a bandwidth of 1024 / 1 * 8 * 1000 = 8192000
  388. this.clock.tick(1);
  389. // segment
  390. this.standardXHRResponse(this.requests.shift());
  391. this.masterPlaylistController.mainSegmentLoader_.trigger('progress');
  392. assert.equal(progressCount, 1, 'fired a progress event');
  393. // verify stats
  394. assert.equal(this.player.tech_.hls.stats.bandwidth, 8192000, 'Live stream');
  395. assert.equal(this.player.tech_.hls.stats.mediaRequests, 1, '1 segment request');
  396. assert.equal(this.player.tech_.hls.stats.mediaBytesTransferred,
  397. 1024,
  398. '1024 bytes downloaded');
  399. });
  400. QUnit.test('updates the enabled track when switching audio groups', function(assert) {
  401. openMediaSource(this.player, this.clock);
  402. // master
  403. this.requests.shift().respond(200, null,
  404. manifests.multipleAudioGroupsCombinedMain);
  405. // media
  406. this.standardXHRResponse(this.requests.shift());
  407. // init segment
  408. this.standardXHRResponse(this.requests.shift());
  409. // video segment
  410. this.standardXHRResponse(this.requests.shift());
  411. // audio media
  412. this.standardXHRResponse(this.requests.shift());
  413. // ignore audio segment requests
  414. this.requests.length = 0;
  415. let mpc = this.masterPlaylistController;
  416. let combinedPlaylist = mpc.master().playlists[0];
  417. mpc.masterPlaylistLoader_.media(combinedPlaylist);
  418. // updated media
  419. this.requests.shift().respond(200, null,
  420. '#EXTM3U\n' +
  421. '#EXTINF:5.0\n' +
  422. '0.ts\n' +
  423. '#EXT-X-ENDLIST\n');
  424. assert.ok(mpc.activeAudioGroup().filter((track) => track.enabled)[0],
  425. 'enabled a track in the new audio group');
  426. });
  427. QUnit.test('waits for both main and audio loaders to finish before calling endOfStream',
  428. function(assert) {
  429. openMediaSource(this.player, this.clock);
  430. const videoMedia = '#EXTM3U\n' +
  431. '#EXT-X-VERSION:3\n' +
  432. '#EXT-X-PLAYLIST-TYPE:VOD\n' +
  433. '#EXT-X-MEDIA-SEQUENCE:0\n' +
  434. '#EXT-X-TARGETDURATION:10\n' +
  435. '#EXTINF:10,\n' +
  436. 'video-0.ts\n' +
  437. '#EXT-X-ENDLIST\n';
  438. const audioMedia = '#EXTM3U\n' +
  439. '#EXT-X-VERSION:3\n' +
  440. '#EXT-X-PLAYLIST-TYPE:VOD\n' +
  441. '#EXT-X-MEDIA-SEQUENCE:0\n' +
  442. '#EXT-X-TARGETDURATION:10\n' +
  443. '#EXTINF:10,\n' +
  444. 'audio-0.ts\n' +
  445. '#EXT-X-ENDLIST\n';
  446. let videoEnded = 0;
  447. let audioEnded = 0;
  448. const MPC = this.masterPlaylistController;
  449. MPC.mainSegmentLoader_.on('ended', () => videoEnded++);
  450. MPC.audioSegmentLoader_.on('ended', () => audioEnded++);
  451. // master
  452. this.standardXHRResponse(this.requests.shift(), manifests.demuxed);
  453. // video media
  454. this.standardXHRResponse(this.requests.shift(), videoMedia);
  455. // audio media
  456. this.standardXHRResponse(this.requests.shift(), audioMedia);
  457. // video segment
  458. this.standardXHRResponse(this.requests.shift());
  459. MPC.mediaSource.sourceBuffers[0].trigger('updateend');
  460. assert.equal(videoEnded, 1, 'main segment loader triggered endded');
  461. assert.equal(audioEnded, 0, 'audio segment loader did not trigger ended');
  462. assert.equal(MPC.mediaSource.readyState, 'open', 'Media Source not yet ended');
  463. // audio segment
  464. this.standardXHRResponse(this.requests.shift());
  465. MPC.mediaSource.sourceBuffers[1].trigger('updateend');
  466. assert.equal(videoEnded, 1, 'main segment loader did not trigger ended again');
  467. assert.equal(audioEnded, 1, 'audio segment loader triggered ended');
  468. assert.equal(MPC.mediaSource.readyState, 'ended', 'Media Source ended');
  469. });
  470. QUnit.test('detects if the player is stuck at the playlist end', function(assert) {
  471. let playlistCopy = Hls.Playlist.playlistEnd;
  472. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  473. this.standardXHRResponse(this.requests.shift());
  474. let playlist = this.player.tech_.hls.selectPlaylist();
  475. // not stuck at playlist end when no seekable, even if empty buffer
  476. // and positive currentTime
  477. this.masterPlaylistController.seekable = () => videojs.createTimeRange();
  478. this.player.tech_.buffered = () => videojs.createTimeRange();
  479. this.player.tech_.setCurrentTime(170);
  480. assert.ok(!this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  481. 'not stuck at playlist end');
  482. // not stuck at playlist end when no seekable, even if empty buffer
  483. // and currentTime 0
  484. this.player.tech_.setCurrentTime(0);
  485. assert.ok(!this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  486. 'not stuck at playlist end');
  487. // not stuck at playlist end when no seekable but current time is at
  488. // the end of the buffered range
  489. this.player.tech_.buffered = () => videojs.createTimeRange(0, 170);
  490. assert.ok(!this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  491. 'not stuck at playlist end');
  492. // not stuck at playlist end when currentTime not at seekable end
  493. // even if the buffer is empty
  494. this.masterPlaylistController.seekable = () => videojs.createTimeRange(0, 130);
  495. this.masterPlaylistController.syncController_.getExpiredTime = () => 0;
  496. this.player.tech_.setCurrentTime(50);
  497. this.player.tech_.buffered = () => videojs.createTimeRange();
  498. Hls.Playlist.playlistEnd = () => 130;
  499. assert.ok(!this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  500. 'not stuck at playlist end');
  501. // not stuck at playlist end when buffer reached the absolute end of the playlist
  502. // and current time is in the buffered range
  503. this.player.tech_.setCurrentTime(159);
  504. this.player.tech_.buffered = () => videojs.createTimeRange(0, 160);
  505. Hls.Playlist.playlistEnd = () => 160;
  506. assert.ok(!this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  507. 'not stuck at playlist end');
  508. // stuck at playlist end when there is no buffer and playhead
  509. // reached absolute end of playlist
  510. this.player.tech_.setCurrentTime(160);
  511. assert.ok(this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  512. 'stuck at playlist end');
  513. // stuck at playlist end when current time reached the buffer end
  514. // and buffer has reached absolute end of playlist
  515. this.masterPlaylistController.seekable = () => videojs.createTimeRange(90, 130);
  516. this.player.tech_.buffered = () => videojs.createTimeRange(0, 170);
  517. this.player.tech_.setCurrentTime(170);
  518. Hls.Playlist.playlistEnd = () => 170;
  519. assert.ok(this.masterPlaylistController.stuckAtPlaylistEnd_(playlist),
  520. 'stuck at playlist end');
  521. Hls.Playlist.playlistEnd = playlistCopy;
  522. });
  523. QUnit.test('blacklists switching from video+audio playlists to audio only',
  524. function(assert) {
  525. let audioPlaylist;
  526. openMediaSource(this.player, this.clock);
  527. this.player.tech_.hls.bandwidth = 1e10;
  528. // master
  529. this.requests.shift().respond(200, null,
  530. '#EXTM3U\n' +
  531. '#EXT-X-STREAM-INF:BANDWIDTH=1,CODECS="mp4a.40.2"\n' +
  532. 'media.m3u8\n' +
  533. '#EXT-X-STREAM-INF:BANDWIDTH=10,RESOLUTION=1x1\n' +
  534. 'media1.m3u8\n');
  535. // media1
  536. this.standardXHRResponse(this.requests.shift());
  537. assert.equal(this.masterPlaylistController.masterPlaylistLoader_.media(),
  538. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[1],
  539. 'selected video+audio');
  540. audioPlaylist = this.masterPlaylistController.masterPlaylistLoader_.master.playlists[0];
  541. assert.equal(audioPlaylist.excludeUntil, Infinity, 'excluded incompatible playlist');
  542. // verify stats
  543. assert.equal(this.player.tech_.hls.stats.bandwidth, 1e10, 'bandwidth we set above');
  544. });
  545. QUnit.test('blacklists switching from audio-only playlists to video+audio',
  546. function(assert) {
  547. let videoAudioPlaylist;
  548. openMediaSource(this.player, this.clock);
  549. this.player.tech_.hls.bandwidth = 1;
  550. // master
  551. this.requests.shift().respond(200, null,
  552. '#EXTM3U\n' +
  553. '#EXT-X-STREAM-INF:BANDWIDTH=1,CODECS="mp4a.40.2"\n' +
  554. 'media.m3u8\n' +
  555. '#EXT-X-STREAM-INF:BANDWIDTH=10,RESOLUTION=1x1\n' +
  556. 'media1.m3u8\n');
  557. // media1
  558. this.standardXHRResponse(this.requests.shift());
  559. assert.equal(this.masterPlaylistController.masterPlaylistLoader_.media(),
  560. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[0],
  561. 'selected audio only');
  562. videoAudioPlaylist =
  563. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[1];
  564. assert.equal(videoAudioPlaylist.excludeUntil,
  565. Infinity,
  566. 'excluded incompatible playlist');
  567. // verify stats
  568. assert.equal(this.player.tech_.hls.stats.bandwidth, 1, 'bandwidth we set above');
  569. });
  570. QUnit.test('blacklists switching from video-only playlists to video+audio',
  571. function(assert) {
  572. let videoAudioPlaylist;
  573. openMediaSource(this.player, this.clock);
  574. this.player.tech_.hls.bandwidth = 1;
  575. // master
  576. this.requests.shift()
  577. .respond(200, null,
  578. '#EXTM3U\n' +
  579. '#EXT-X-STREAM-INF:BANDWIDTH=1,CODECS="avc1.4d400d"\n' +
  580. 'media.m3u8\n' +
  581. '#EXT-X-STREAM-INF:BANDWIDTH=10,CODECS="avc1.4d400d,mp4a.40.2"\n' +
  582. 'media1.m3u8\n');
  583. // media
  584. this.standardXHRResponse(this.requests.shift());
  585. assert.equal(this.masterPlaylistController.masterPlaylistLoader_.media(),
  586. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[0],
  587. 'selected video only');
  588. videoAudioPlaylist =
  589. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[1];
  590. assert.equal(videoAudioPlaylist.excludeUntil,
  591. Infinity,
  592. 'excluded incompatible playlist');
  593. // verify stats
  594. assert.equal(this.player.tech_.hls.stats.bandwidth, 1, 'bandwidth we set above');
  595. });
  596. QUnit.test('blacklists switching between playlists with incompatible audio codecs',
  597. function(assert) {
  598. let alternatePlaylist;
  599. openMediaSource(this.player, this.clock);
  600. this.player.tech_.hls.bandwidth = 1;
  601. // master
  602. this.requests.shift()
  603. .respond(200, null,
  604. '#EXTM3U\n' +
  605. '#EXT-X-STREAM-INF:BANDWIDTH=1,CODECS="avc1.4d400d,mp4a.40.5"\n' +
  606. 'media.m3u8\n' +
  607. '#EXT-X-STREAM-INF:BANDWIDTH=10,CODECS="avc1.4d400d,mp4a.40.2"\n' +
  608. 'media1.m3u8\n');
  609. // media
  610. this.standardXHRResponse(this.requests.shift());
  611. assert.equal(this.masterPlaylistController.masterPlaylistLoader_.media(),
  612. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[0],
  613. 'selected HE-AAC stream');
  614. alternatePlaylist =
  615. this.masterPlaylistController.masterPlaylistLoader_.master.playlists[1];
  616. assert.equal(alternatePlaylist.excludeUntil,
  617. undefined,
  618. 'not excluded incompatible playlist');
  619. // verify stats
  620. assert.equal(this.player.tech_.hls.stats.bandwidth, 1, 'bandwidth we set above');
  621. });
  622. QUnit.test('blacklists the current playlist when audio changes in Firefox 48 & below',
  623. function(assert) {
  624. videojs.browser.IS_FIREFOX = true;
  625. let origSupportsAudioInfoChange_ = videojs.Hls.supportsAudioInfoChange_;
  626. videojs.Hls.supportsAudioInfoChange_ = () => false;
  627. // master
  628. this.standardXHRResponse(this.requests.shift());
  629. // media
  630. this.standardXHRResponse(this.requests.shift());
  631. let media = this.masterPlaylistController.media();
  632. // initial audio config
  633. this.masterPlaylistController.mediaSource.trigger({
  634. type: 'audioinfo',
  635. info: {}
  636. });
  637. // updated audio config
  638. this.masterPlaylistController.mediaSource.trigger({
  639. type: 'audioinfo',
  640. info: {
  641. different: true
  642. }
  643. });
  644. assert.ok(media.excludeUntil > 0, 'blacklisted the old playlist');
  645. assert.equal(this.env.log.warn.callCount, 2, 'logged two warnings');
  646. this.env.log.warn.callCount = 0;
  647. videojs.Hls.supportsAudioInfoChange_ = origSupportsAudioInfoChange_;
  648. });
  649. QUnit.test('updates the combined segment loader on media changes', function(assert) {
  650. let updates = [];
  651. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  652. this.masterPlaylistController.mainSegmentLoader_.bandwidth = 1;
  653. // master
  654. this.standardXHRResponse(this.requests.shift());
  655. // media
  656. this.standardXHRResponse(this.requests.shift());
  657. this.masterPlaylistController.mainSegmentLoader_.playlist = function(update) {
  658. updates.push(update);
  659. };
  660. // 1ms has passed to upload 1kb
  661. // that gives us a bandwidth of 1024 / 1 * 8 * 1000 = 8192000
  662. this.clock.tick(1);
  663. this.masterPlaylistController.mainSegmentLoader_.mediaIndex = 0;
  664. // downloading the new segment will update bandwidth and cause a
  665. // playlist change
  666. // segment 0
  667. this.standardXHRResponse(this.requests.shift());
  668. // update the buffer to reflect the appended segment, and have enough buffer to
  669. // change playlist
  670. this.masterPlaylistController.tech_.buffered = () => {
  671. return videojs.createTimeRanges([[0, 30]]);
  672. };
  673. this.masterPlaylistController.mediaSource.sourceBuffers[0].trigger('updateend');
  674. // media
  675. this.standardXHRResponse(this.requests.shift());
  676. assert.ok(updates.length > 0, 'updated the segment list');
  677. // verify stats
  678. assert.equal(this.player.tech_.hls.stats.bandwidth, 8192000, 'Live stream');
  679. assert.equal(this.player.tech_.hls.stats.mediaRequests, 1, '1 segment request');
  680. assert.equal(this.player.tech_.hls.stats.mediaBytesTransferred,
  681. 1024,
  682. '1024 bytes downloaded');
  683. });
  684. QUnit.test('selects a playlist after main/combined segment downloads', function(assert) {
  685. let calls = 0;
  686. this.masterPlaylistController.selectPlaylist = () => {
  687. calls++;
  688. return this.masterPlaylistController.masterPlaylistLoader_.master.playlists[0];
  689. };
  690. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  691. // master
  692. this.standardXHRResponse(this.requests.shift());
  693. // media
  694. this.standardXHRResponse(this.requests.shift());
  695. // "downloaded" a segment
  696. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  697. assert.strictEqual(calls, 2, 'selects after the initial segment');
  698. // and another
  699. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  700. assert.strictEqual(calls, 3, 'selects after additional segments');
  701. // verify stats
  702. assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth');
  703. });
  704. QUnit.test('re-triggers bandwidthupdate events on the tech', function(assert) {
  705. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  706. // master
  707. this.standardXHRResponse(this.requests.shift());
  708. // media
  709. this.standardXHRResponse(this.requests.shift());
  710. let bandwidthupdateEvents = 0;
  711. this.player.tech_.on('bandwidthupdate', () => bandwidthupdateEvents++);
  712. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  713. assert.equal(bandwidthupdateEvents, 1, 'triggered bandwidthupdate');
  714. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  715. assert.equal(bandwidthupdateEvents, 2, 'triggered bandwidthupdate');
  716. });
  717. QUnit.test('switches to lower renditions immediately, higher dependent on buffer',
  718. function(assert) {
  719. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  720. // master
  721. this.standardXHRResponse(this.requests.shift());
  722. // media
  723. this.standardXHRResponse(this.requests.shift());
  724. let buffered = [];
  725. let currentPlaylistBandwidth = 0;
  726. let nextPlaylistBandwidth = 0;
  727. let mediaChanges = [];
  728. let currentTime = 0;
  729. let endList = true;
  730. let duration = 100;
  731. this.masterPlaylistController.tech_.currentTime = () => currentTime;
  732. this.masterPlaylistController.tech_.buffered = () => videojs.createTimeRanges(buffered);
  733. this.masterPlaylistController.duration = () => duration;
  734. this.masterPlaylistController.selectPlaylist = () => {
  735. return {
  736. attributes: {
  737. BANDWIDTH: nextPlaylistBandwidth
  738. },
  739. endList
  740. };
  741. };
  742. this.masterPlaylistController.masterPlaylistLoader_.media = (media) => {
  743. if (!media) {
  744. return {
  745. attributes: {
  746. BANDWIDTH: currentPlaylistBandwidth
  747. },
  748. endList
  749. };
  750. }
  751. mediaChanges.push(media);
  752. };
  753. currentTime = 0;
  754. currentPlaylistBandwidth = 1000;
  755. nextPlaylistBandwidth = 1000;
  756. buffered = [];
  757. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  758. assert.equal(mediaChanges.length,
  759. 1,
  760. 'changes media when no buffer and equal bandwidth playlist');
  761. buffered = [[0, 9]];
  762. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  763. assert.equal(mediaChanges.length,
  764. 2,
  765. 'changes media when sufficient forward buffer and equal ' +
  766. 'bandwidth playlist');
  767. buffered = [[0, 30]];
  768. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  769. assert.equal(mediaChanges.length,
  770. 3,
  771. 'changes media when sufficient forward buffer and equal ' +
  772. 'bandwidth playlist');
  773. mediaChanges.length = 0;
  774. currentTime = 10;
  775. currentPlaylistBandwidth = 1000;
  776. nextPlaylistBandwidth = 1001;
  777. buffered = [];
  778. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  779. assert.equal(mediaChanges.length,
  780. 0,
  781. 'did not change media when no buffer and and higher bandwidth playlist');
  782. buffered = [[0, 19]];
  783. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  784. assert.equal(mediaChanges.length,
  785. 0,
  786. 'did not change media when insufficient forward buffer and higher ' +
  787. 'bandwidth playlist');
  788. buffered = [[0, 20]];
  789. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  790. assert.equal(mediaChanges.length,
  791. 1,
  792. 'changes media when sufficient forward buffer and higher ' +
  793. 'bandwidth playlist');
  794. buffered = [[0, 21]];
  795. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  796. assert.equal(mediaChanges.length,
  797. 2,
  798. 'changes media when sufficient forward buffer and higher ' +
  799. 'bandwidth playlist');
  800. mediaChanges.length = 0;
  801. currentTime = 100;
  802. currentPlaylistBandwidth = 1000;
  803. nextPlaylistBandwidth = 1001;
  804. buffered = [];
  805. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  806. assert.equal(mediaChanges.length,
  807. 0,
  808. 'did not change media when no buffer and higher bandwidth playlist');
  809. buffered = [[0, 100], [100, 109]];
  810. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  811. assert.equal(mediaChanges.length,
  812. 0,
  813. 'did not change media when insufficient forward buffer and higher ' +
  814. 'bandwidth playlist');
  815. buffered = [[0, 100], [100, 130]];
  816. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  817. assert.equal(mediaChanges.length,
  818. 1,
  819. 'changes media when sufficient forward buffer and higher ' +
  820. 'bandwidth playlist');
  821. mediaChanges.length = 0;
  822. buffered = [];
  823. currentPlaylistBandwidth = 1000;
  824. nextPlaylistBandwidth = 999;
  825. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  826. assert.equal(mediaChanges.length,
  827. 1,
  828. 'changes media when no buffer but lower bandwidth playlist');
  829. buffered = [[100, 109]];
  830. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  831. assert.equal(mediaChanges.length,
  832. 2,
  833. 'changes media when insufficient forward buffer but lower ' +
  834. 'bandwidth playlist');
  835. buffered = [[100, 110]];
  836. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  837. assert.equal(mediaChanges.length,
  838. 3,
  839. 'changes media when sufficient forward buffer and lower ' +
  840. 'bandwidth playlist');
  841. mediaChanges.length = 0;
  842. endList = false;
  843. currentTime = 100;
  844. currentPlaylistBandwidth = 1000;
  845. nextPlaylistBandwidth = 1001;
  846. buffered = [];
  847. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  848. assert.equal(mediaChanges.length,
  849. 1,
  850. 'changes live media when no buffer and higher bandwidth playlist');
  851. buffered = [[0, 100], [100, 109]];
  852. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  853. assert.equal(mediaChanges.length,
  854. 2,
  855. 'changes live media when insufficient forward buffer and higher ' +
  856. 'bandwidth playlist');
  857. buffered = [[0, 100], [100, 130]];
  858. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  859. assert.equal(mediaChanges.length,
  860. 3,
  861. 'changes live media when sufficient forward buffer and higher ' +
  862. 'bandwidth playlist');
  863. mediaChanges.length = 0;
  864. endList = true;
  865. currentTime = 9;
  866. duration = 18;
  867. buffered = [];
  868. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  869. assert.equal(mediaChanges.length,
  870. 1,
  871. 'changes media when no buffer and duration less than low water line');
  872. buffered = [[0, 10]];
  873. this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate');
  874. assert.equal(mediaChanges.length,
  875. 2,
  876. 'changes media when insufficient forward buffer and duration ' +
  877. 'less than low water line');
  878. });
  879. QUnit.test('updates the duration after switching playlists', function(assert) {
  880. let selectedPlaylist = false;
  881. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  882. this.masterPlaylistController.bandwidth = 1e20;
  883. // master
  884. this.standardXHRResponse(this.requests[0]);
  885. // media
  886. this.standardXHRResponse(this.requests[1]);
  887. this.masterPlaylistController.selectPlaylist = () => {
  888. selectedPlaylist = true;
  889. // this duration should be overwritten by the playlist change
  890. this.masterPlaylistController.mediaSource.duration = 0;
  891. this.masterPlaylistController.mediaSource.readyState = 'open';
  892. return this.masterPlaylistController.masterPlaylistLoader_.master.playlists[1];
  893. };
  894. // 1ms has passed to upload 1kb
  895. // that gives us a bandwidth of 1024 / 1 * 8 * 1000 = 8192000
  896. this.clock.tick(1);
  897. this.masterPlaylistController.mainSegmentLoader_.mediaIndex = 0;
  898. // segment 0
  899. this.standardXHRResponse(this.requests[2]);
  900. this.masterPlaylistController.mediaSource.sourceBuffers[0].trigger('updateend');
  901. // media1
  902. this.standardXHRResponse(this.requests[3]);
  903. assert.ok(selectedPlaylist, 'selected playlist');
  904. assert.ok(this.masterPlaylistController.mediaSource.duration !== 0,
  905. 'updates the duration');
  906. // verify stats
  907. assert.equal(this.player.tech_.hls.stats.bandwidth, 8192000, 'Live stream');
  908. assert.equal(this.player.tech_.hls.stats.mediaRequests, 1, '1 segment request');
  909. assert.equal(this.player.tech_.hls.stats.mediaBytesTransferred,
  910. 1024,
  911. '1024 bytes downloaded');
  912. });
  913. QUnit.test('playlist selection uses systemBandwidth', function(assert) {
  914. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  915. this.player.width(1000);
  916. this.player.height(900);
  917. // master
  918. this.standardXHRResponse(this.requests[0]);
  919. // media
  920. this.standardXHRResponse(this.requests[1]);
  921. assert.ok(/media3\.m3u8/i.test(this.requests[1].url), 'Selected the highest rendition');
  922. // 1ms has passed to upload 1kb
  923. // that gives us a bandwidth of 1024 / 1 * 8 * 1000 = 8192000
  924. this.clock.tick(1);
  925. this.masterPlaylistController.mainSegmentLoader_.mediaIndex = 0;
  926. // segment 0
  927. this.standardXHRResponse(this.requests[2]);
  928. // 20ms have passed to upload 1kb
  929. // that gives us a throughput of 1024 / 20 * 8 * 1000 = 409600
  930. this.clock.tick(20);
  931. this.masterPlaylistController.mediaSource.sourceBuffers[0].trigger('updateend');
  932. // systemBandwidth is 1 / (1 / 8192000 + 1 / 409600) = ~390095
  933. // media1
  934. this.standardXHRResponse(this.requests[3]);
  935. assert.ok(/media\.m3u8/i.test(this.requests[3].url), 'Selected the rendition < 390095');
  936. assert.ok(this.masterPlaylistController.mediaSource.duration !== 0,
  937. 'updates the duration');
  938. // verify stats
  939. assert.equal(this.player.tech_.hls.stats.bandwidth, 8192000, 'Live stream');
  940. assert.equal(this.player.tech_.hls.stats.mediaRequests, 1, '1 segment request');
  941. assert.equal(this.player.tech_.hls.stats.mediaBytesTransferred,
  942. 1024,
  943. '1024 bytes downloaded');
  944. });
  945. QUnit.test('removes request timeout when segment timesout on lowest rendition',
  946. function(assert) {
  947. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  948. // master
  949. this.standardXHRResponse(this.requests[0]);
  950. // media
  951. this.standardXHRResponse(this.requests[1]);
  952. assert.equal(this.masterPlaylistController.requestOptions_.timeout,
  953. this.masterPlaylistController.masterPlaylistLoader_.targetDuration * 1.5 *
  954. 1000,
  955. 'default request timeout');
  956. assert.ok(!this.masterPlaylistController
  957. .masterPlaylistLoader_
  958. .isLowestEnabledRendition_(), 'Not lowest rendition');
  959. // Cause segment to timeout to force player into lowest rendition
  960. this.requests[2].timedout = true;
  961. // Downloading segment should cause media change and timeout removal
  962. // segment 0
  963. this.standardXHRResponse(this.requests[2]);
  964. // Download new segment after media change
  965. this.standardXHRResponse(this.requests[3]);
  966. assert.ok(this.masterPlaylistController
  967. .masterPlaylistLoader_.isLowestEnabledRendition_(), 'On lowest rendition');
  968. assert.equal(this.masterPlaylistController.requestOptions_.timeout, 0,
  969. 'request timeout 0');
  970. });
  971. QUnit.test('removes request timeout when the source is a media playlist and not master',
  972. function(assert) {
  973. this.requests.length = 0;
  974. this.player.src({
  975. src: 'manifest/media.m3u8',
  976. type: 'application/vnd.apple.mpegurl'
  977. });
  978. this.clock.tick(1);
  979. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  980. // media
  981. this.standardXHRResponse(this.requests.shift());
  982. assert.equal(this.masterPlaylistController.requestOptions_.timeout, 0,
  983. 'request timeout set to 0 when loading a non master playlist');
  984. });
  985. QUnit.test('seekable uses the intersection of alternate audio and combined tracks',
  986. function(assert) {
  987. let origSeekable = Playlist.seekable;
  988. let mpc = this.masterPlaylistController;
  989. let mainMedia = {};
  990. let audioMedia = {};
  991. let mainTimeRanges = [];
  992. let audioTimeRanges = [];
  993. let assertTimeRangesEqual = (left, right, message) => {
  994. if (left.length === 0 && right.length === 0) {
  995. return;
  996. }
  997. assert.equal(left.length, 1, message);
  998. assert.equal(right.length, 1, message);
  999. assert.equal(left.start(0), right.start(0), message);
  1000. assert.equal(left.end(0), right.end(0), message);
  1001. };
  1002. this.masterPlaylistController.masterPlaylistLoader_.media = () => mainMedia;
  1003. this.masterPlaylistController.syncController_.getExpiredTime = () => 0;
  1004. Playlist.seekable = (media) => {
  1005. if (media === mainMedia) {
  1006. return videojs.createTimeRanges(mainTimeRanges);
  1007. }
  1008. return videojs.createTimeRanges(audioTimeRanges);
  1009. };
  1010. assertTimeRangesEqual(mpc.seekable(),
  1011. videojs.createTimeRanges(),
  1012. 'empty when main empty');
  1013. mainTimeRanges = [[0, 10]];
  1014. mpc.seekable_ = videojs.createTimeRanges();
  1015. mpc.onSyncInfoUpdate_();
  1016. assertTimeRangesEqual(mpc.seekable(),
  1017. videojs.createTimeRanges([[0, 10]]),
  1018. 'main when no audio');
  1019. mpc.audioPlaylistLoader_ = {
  1020. media: () => audioMedia,
  1021. dispose() {},
  1022. expired_: 0
  1023. };
  1024. mainTimeRanges = [];
  1025. mpc.seekable_ = videojs.createTimeRanges();
  1026. mpc.onSyncInfoUpdate_();
  1027. assertTimeRangesEqual(mpc.seekable(),
  1028. videojs.createTimeRanges(),
  1029. 'empty when both empty');
  1030. mainTimeRanges = [[0, 10]];
  1031. mpc.seekable_ = videojs.createTimeRanges();
  1032. mpc.onSyncInfoUpdate_();
  1033. assertTimeRangesEqual(mpc.seekable(),
  1034. videojs.createTimeRanges(),
  1035. 'empty when audio empty');
  1036. mainTimeRanges = [];
  1037. audioTimeRanges = [[0, 10]];
  1038. mpc.seekable_ = videojs.createTimeRanges();
  1039. mpc.onSyncInfoUpdate_();
  1040. assertTimeRangesEqual(mpc.seekable(),
  1041. videojs.createTimeRanges(),
  1042. 'empty when main empty');
  1043. mainTimeRanges = [[0, 10]];
  1044. audioTimeRanges = [[0, 10]];
  1045. mpc.seekable_ = videojs.createTimeRanges();
  1046. mpc.onSyncInfoUpdate_();
  1047. assertTimeRangesEqual(mpc.seekable(),
  1048. videojs.createTimeRanges([[0, 10]]),
  1049. 'ranges equal');
  1050. mainTimeRanges = [[5, 10]];
  1051. mpc.seekable_ = videojs.createTimeRanges();
  1052. mpc.onSyncInfoUpdate_();
  1053. assertTimeRangesEqual(mpc.seekable(),
  1054. videojs.createTimeRanges([[5, 10]]),
  1055. 'main later start');
  1056. mainTimeRanges = [[0, 10]];
  1057. audioTimeRanges = [[5, 10]];
  1058. mpc.seekable_ = videojs.createTimeRanges();
  1059. mpc.onSyncInfoUpdate_();
  1060. assertTimeRangesEqual(mpc.seekable(),
  1061. videojs.createTimeRanges([[5, 10]]),
  1062. 'audio later start');
  1063. mainTimeRanges = [[0, 9]];
  1064. audioTimeRanges = [[0, 10]];
  1065. mpc.seekable_ = videojs.createTimeRanges();
  1066. mpc.onSyncInfoUpdate_();
  1067. assertTimeRangesEqual(mpc.seekable(),
  1068. videojs.createTimeRanges([[0, 9]]),
  1069. 'main earlier end');
  1070. mainTimeRanges = [[0, 10]];
  1071. audioTimeRanges = [[0, 9]];
  1072. mpc.seekable_ = videojs.createTimeRanges();
  1073. mpc.onSyncInfoUpdate_();
  1074. assertTimeRangesEqual(mpc.seekable(),
  1075. videojs.createTimeRanges([[0, 9]]),
  1076. 'audio earlier end');
  1077. mainTimeRanges = [[1, 10]];
  1078. audioTimeRanges = [[0, 9]];
  1079. mpc.seekable_ = videojs.createTimeRanges();
  1080. mpc.onSyncInfoUpdate_();
  1081. assertTimeRangesEqual(mpc.seekable(),
  1082. videojs.createTimeRanges([[1, 9]]),
  1083. 'main later start, audio earlier end');
  1084. mainTimeRanges = [[0, 9]];
  1085. audioTimeRanges = [[1, 10]];
  1086. mpc.seekable_ = videojs.createTimeRanges();
  1087. mpc.onSyncInfoUpdate_();
  1088. assertTimeRangesEqual(mpc.seekable(),
  1089. videojs.createTimeRanges([[1, 9]]),
  1090. 'audio later start, main earlier end');
  1091. mainTimeRanges = [[2, 9]];
  1092. mpc.seekable_ = videojs.createTimeRanges();
  1093. mpc.onSyncInfoUpdate_();
  1094. assertTimeRangesEqual(mpc.seekable(),
  1095. videojs.createTimeRanges([[2, 9]]),
  1096. 'main later start, main earlier end');
  1097. mainTimeRanges = [[1, 10]];
  1098. audioTimeRanges = [[2, 9]];
  1099. mpc.seekable_ = videojs.createTimeRanges();
  1100. mpc.onSyncInfoUpdate_();
  1101. assertTimeRangesEqual(mpc.seekable(),
  1102. videojs.createTimeRanges([[2, 9]]),
  1103. 'audio later start, audio earlier end');
  1104. mainTimeRanges = [[1, 10]];
  1105. audioTimeRanges = [[11, 20]];
  1106. mpc.seekable_ = videojs.createTimeRanges();
  1107. mpc.onSyncInfoUpdate_();
  1108. assertTimeRangesEqual(mpc.seekable(),
  1109. videojs.createTimeRanges([[1, 10]]),
  1110. 'no intersection, audio later');
  1111. mainTimeRanges = [[11, 20]];
  1112. audioTimeRanges = [[1, 10]];
  1113. mpc.seekable_ = videojs.createTimeRanges();
  1114. mpc.onSyncInfoUpdate_();
  1115. assertTimeRangesEqual(mpc.seekable(),
  1116. videojs.createTimeRanges([[11, 20]]),
  1117. 'no intersection, main later');
  1118. Playlist.seekable = origSeekable;
  1119. });
  1120. QUnit.test('syncInfoUpdate triggers seekablechanged when seekable is updated',
  1121. function(assert) {
  1122. let origSeekable = Playlist.seekable;
  1123. let mpc = this.masterPlaylistController;
  1124. let tech = this.player.tech_;
  1125. let mainTimeRanges = [];
  1126. let media = {};
  1127. let seekablechanged = 0;
  1128. tech.on('seekablechanged', () => seekablechanged++);
  1129. Playlist.seekable = () => {
  1130. return videojs.createTimeRanges(mainTimeRanges);
  1131. };
  1132. this.masterPlaylistController.masterPlaylistLoader_.media = () => media;
  1133. this.masterPlaylistController.syncController_.getExpiredTime = () => 0;
  1134. mainTimeRanges = [[0, 10]];
  1135. mpc.seekable_ = videojs.createTimeRanges();
  1136. mpc.onSyncInfoUpdate_();
  1137. assert.equal(seekablechanged, 1, 'seekablechanged triggered');
  1138. Playlist.seekable = origSeekable;
  1139. });
  1140. QUnit.test('calls to update cues on new media', function(assert) {
  1141. let origHlsOptions = videojs.options.hls;
  1142. videojs.options.hls = {
  1143. useCueTags: true
  1144. };
  1145. this.player = createPlayer();
  1146. this.player.src({
  1147. src: 'manifest/media.m3u8',
  1148. type: 'application/vnd.apple.mpegurl'
  1149. });
  1150. this.clock.tick(1);
  1151. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1152. let callCount = 0;
  1153. this.masterPlaylistController.updateAdCues_ = (media) => callCount++;
  1154. // master
  1155. this.standardXHRResponse(this.requests.shift());
  1156. assert.equal(callCount, 0, 'no call to update cues on master');
  1157. // media
  1158. this.standardXHRResponse(this.requests.shift());
  1159. assert.equal(callCount, 1, 'calls to update cues on first media');
  1160. this.masterPlaylistController.masterPlaylistLoader_.trigger('loadedplaylist');
  1161. assert.equal(callCount, 2, 'calls to update cues on subsequent media');
  1162. videojs.options.hls = origHlsOptions;
  1163. });
  1164. QUnit.test('calls to update cues on media when no master', function(assert) {
  1165. this.requests.length = 0;
  1166. this.player.src({
  1167. src: 'manifest/media.m3u8',
  1168. type: 'application/vnd.apple.mpegurl'
  1169. });
  1170. this.clock.tick(1);
  1171. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1172. this.masterPlaylistController.useCueTags_ = true;
  1173. let callCount = 0;
  1174. this.masterPlaylistController.updateAdCues_ = (media) => callCount++;
  1175. // media
  1176. this.standardXHRResponse(this.requests.shift());
  1177. assert.equal(callCount, 1, 'calls to update cues on first media');
  1178. this.masterPlaylistController.masterPlaylistLoader_.trigger('loadedplaylist');
  1179. assert.equal(callCount, 2, 'calls to update cues on subsequent media');
  1180. });
  1181. QUnit.test('respects useCueTags option', function(assert) {
  1182. let origHlsOptions = videojs.options.hls;
  1183. let hlsPlaylistCueTagsEvents = 0;
  1184. videojs.options.hls = {
  1185. useCueTags: true
  1186. };
  1187. this.player = createPlayer();
  1188. this.player.tech_.on('usage', (event) => {
  1189. if (event.name === 'hls-playlist-cue-tags') {
  1190. hlsPlaylistCueTagsEvents++;
  1191. }
  1192. });
  1193. this.player.src({
  1194. src: 'manifest/media.m3u8',
  1195. type: 'application/vnd.apple.mpegurl'
  1196. });
  1197. this.clock.tick(1);
  1198. this.masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1199. this.standardXHRResponse(this.requests.shift());
  1200. this.standardXHRResponse(this.requests.shift());
  1201. assert.equal(hlsPlaylistCueTagsEvents, 1, 'cue tags event has been triggered once');
  1202. assert.ok(this.masterPlaylistController.cueTagsTrack_,
  1203. 'creates cueTagsTrack_ if useCueTags is truthy');
  1204. assert.equal(this.masterPlaylistController.cueTagsTrack_.label,
  1205. 'ad-cues',
  1206. 'cueTagsTrack_ has label of ad-cues');
  1207. assert.equal(this.player.textTracks()[0], this.masterPlaylistController.cueTagsTrack_,
  1208. 'adds cueTagsTrack as a text track if useCueTags is truthy');
  1209. videojs.options.hls = origHlsOptions;
  1210. });
  1211. QUnit.test('correctly sets alternate audio track kinds', function(assert) {
  1212. this.requests.length = 0;
  1213. this.player = createPlayer();
  1214. this.player.src({
  1215. src: 'manifest/alternate-audio-accessibility.m3u8',
  1216. type: 'application/vnd.apple.mpegurl'
  1217. });
  1218. this.clock.tick(1);
  1219. // master
  1220. this.standardXHRResponse(this.requests.shift());
  1221. // media - required for loadedmetadata
  1222. this.standardXHRResponse(this.requests.shift());
  1223. const audioTracks = this.player.tech_.audioTracks();
  1224. assert.equal(audioTracks.length, 4, 'added 4 audio tracks');
  1225. assert.equal(audioTracks[0].id, 'English', 'contains english track');
  1226. assert.equal(audioTracks[0].kind, 'main', 'english track\'s kind is "main"');
  1227. assert.equal(audioTracks[1].id,
  1228. 'English Descriptions',
  1229. 'contains english descriptions track');
  1230. assert.equal(audioTracks[1].kind,
  1231. 'main-desc',
  1232. 'english descriptions track\'s kind is "main-desc"');
  1233. assert.equal(audioTracks[2].id, 'Français', 'contains french track');
  1234. assert.equal(audioTracks[2].kind,
  1235. 'alternative',
  1236. 'french track\'s kind is "alternative"');
  1237. assert.equal(audioTracks[3].id, 'Espanol', 'contains spanish track');
  1238. assert.equal(audioTracks[3].kind,
  1239. 'alternative',
  1240. 'spanish track\'s kind is "alternative"');
  1241. });
  1242. QUnit.test('trigger events when video and audio is demuxed by default', function(assert) {
  1243. let hlsDemuxedEvents = 0;
  1244. this.requests.length = 0;
  1245. this.player = createPlayer();
  1246. this.player.src({
  1247. src: 'manifest/multipleAudioGroups.m3u8',
  1248. type: 'application/vnd.apple.mpegurl'
  1249. });
  1250. this.player.tech_.on('usage', (event) => {
  1251. if (event.name === 'hls-demuxed') {
  1252. hlsDemuxedEvents++;
  1253. }
  1254. });
  1255. openMediaSource(this.player, this.clock);
  1256. // master
  1257. this.standardXHRResponse(this.requests.shift());
  1258. // media
  1259. this.standardXHRResponse(this.requests.shift());
  1260. assert.equal(hlsDemuxedEvents, 1, 'video and audio is demuxed by default');
  1261. });
  1262. QUnit.test('trigger events when an AES is detected', function(assert) {
  1263. let hlsAesEvents = 0;
  1264. let isAesCopy = Hls.Playlist.isAes;
  1265. Hls.Playlist.isAes = (media) => {
  1266. return true;
  1267. };
  1268. this.player.tech_.on('usage', (event) => {
  1269. if (event.name === 'hls-aes') {
  1270. hlsAesEvents++;
  1271. }
  1272. });
  1273. // master
  1274. this.standardXHRResponse(this.requests.shift());
  1275. // media
  1276. this.standardXHRResponse(this.requests.shift());
  1277. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  1278. assert.equal(hlsAesEvents, 1, 'an AES HLS stream is detected');
  1279. Hls.Playlist.isAes = isAesCopy;
  1280. });
  1281. QUnit.test('trigger events when an fMP4 stream is detected', function(assert) {
  1282. let hlsFmp4Events = 0;
  1283. let isFmp4Copy = Hls.Playlist.isFmp4;
  1284. Hls.Playlist.isFmp4 = (media) => {
  1285. return true;
  1286. };
  1287. this.player.tech_.on('usage', (event) => {
  1288. if (event.name === 'hls-fmp4') {
  1289. hlsFmp4Events++;
  1290. }
  1291. });
  1292. // master
  1293. this.standardXHRResponse(this.requests.shift());
  1294. // media
  1295. this.standardXHRResponse(this.requests.shift());
  1296. this.masterPlaylistController.mediaSource.trigger('sourceopen');
  1297. assert.equal(hlsFmp4Events, 1, 'an fMP4 stream is detected');
  1298. Hls.Playlist.isFmp4 = isFmp4Copy;
  1299. });
  1300. QUnit.test('adds subtitle tracks when a media playlist is loaded', function(assert) {
  1301. let hlsWebvttEvents = 0;
  1302. this.requests.length = 0;
  1303. this.player = createPlayer();
  1304. this.player.src({
  1305. src: 'manifest/master-subtitles.m3u8',
  1306. type: 'application/vnd.apple.mpegurl'
  1307. });
  1308. this.clock.tick(1);
  1309. this.player.tech_.on('usage', (event) => {
  1310. if (event.name === 'hls-webvtt') {
  1311. hlsWebvttEvents++;
  1312. }
  1313. });
  1314. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1315. assert.equal(hlsWebvttEvents, 0, 'there is no webvtt detected');
  1316. assert.equal(this.player.textTracks().length, 1, 'one text track to start');
  1317. assert.equal(this.player.textTracks()[0].label,
  1318. 'segment-metadata',
  1319. 'only segment-metadata text track');
  1320. // master, contains media groups for subtitles
  1321. this.standardXHRResponse(this.requests.shift());
  1322. // we wait for loadedmetadata before setting subtitle tracks, so we need to wait for a
  1323. // media playlist
  1324. assert.equal(this.player.textTracks().length, 1, 'only one text track after master');
  1325. // media
  1326. this.standardXHRResponse(this.requests.shift());
  1327. const master = masterPlaylistController.masterPlaylistLoader_.master;
  1328. const subs = master.mediaGroups.SUBTITLES.subs;
  1329. const subsArr = Object.keys(subs).map(key => subs[key]);
  1330. assert.equal(subsArr.length, 4, 'got 4 subtitles');
  1331. assert.equal(subsArr.filter(sub => sub.forced === false).length, 2, '2 forced');
  1332. assert.equal(subsArr.filter(sub => sub.forced === true).length, 2, '2 non-forced');
  1333. const textTracks = this.player.textTracks();
  1334. assert.equal(textTracks.length, 3, 'non-forced text tracks were added');
  1335. assert.equal(textTracks[1].mode, 'disabled', 'track starts disabled');
  1336. assert.equal(textTracks[2].mode, 'disabled', 'track starts disabled');
  1337. assert.equal(hlsWebvttEvents, 1, 'there is webvtt detected in the rendition');
  1338. // change source to make sure tracks are cleaned up
  1339. this.player.src({
  1340. src: 'http://example.com/media.mp4',
  1341. type: 'video/mp4'
  1342. });
  1343. this.clock.tick(1);
  1344. assert.equal(this.player.textTracks().length, 0, 'text tracks cleaned');
  1345. });
  1346. QUnit.test('switches off subtitles on subtitle errors', function(assert) {
  1347. this.requests.length = 0;
  1348. this.player = createPlayer();
  1349. this.player.src({
  1350. src: 'manifest/master-subtitles.m3u8',
  1351. type: 'application/vnd.apple.mpegurl'
  1352. });
  1353. this.clock.tick(1);
  1354. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1355. // sets up listener for text track changes
  1356. masterPlaylistController.trigger('sourceopen');
  1357. // master, contains media groups for subtitles
  1358. this.standardXHRResponse(this.requests.shift());
  1359. // media
  1360. this.standardXHRResponse(this.requests.shift());
  1361. const textTracks = this.player.textTracks();
  1362. assert.equal(this.requests.length, 0, 'no outstanding requests');
  1363. // enable first subtitle text track
  1364. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1365. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1366. textTracks[1].mode = 'showing';
  1367. assert.equal(this.requests.length, 1, 'made a request');
  1368. assert.equal(textTracks[1].mode, 'showing', 'text track still showing');
  1369. // request failed
  1370. this.requests.shift().respond(404, null, '');
  1371. assert.equal(textTracks[1].mode, 'disabled', 'disabled text track');
  1372. assert.equal(this.env.log.warn.callCount, 1, 'logged a warning');
  1373. this.env.log.warn.callCount = 0;
  1374. assert.equal(this.requests.length, 0, 'no outstanding requests');
  1375. // re-enable first text track
  1376. textTracks[1].mode = 'showing';
  1377. assert.equal(this.requests.length, 1, 'made a request');
  1378. assert.equal(textTracks[1].mode, 'showing', 'text track still showing');
  1379. this.requests.shift().respond(200, null, `
  1380. #EXTM3U
  1381. #EXT-X-TARGETDURATION:10
  1382. #EXT-X-MEDIA-SEQUENCE:0
  1383. #EXTINF:10
  1384. 0.webvtt
  1385. #EXT-X-ENDLIST
  1386. `);
  1387. const syncController = masterPlaylistController.subtitleSegmentLoader_.syncController_;
  1388. // required for the vtt request to be made
  1389. syncController.timestampOffsetForTimeline = () => 0;
  1390. this.clock.tick(1);
  1391. assert.equal(this.requests.length, 1, 'made a request');
  1392. assert.ok(this.requests[0].url.endsWith('0.webvtt'), 'made a webvtt request');
  1393. assert.equal(textTracks[1].mode, 'showing', 'text track still showing');
  1394. this.requests.shift().respond(404, null, '');
  1395. assert.equal(textTracks[1].mode, 'disabled', 'disabled text track');
  1396. assert.equal(this.env.log.warn.callCount, 1, 'logged a warning');
  1397. this.env.log.warn.callCount = 0;
  1398. });
  1399. QUnit.test('pauses subtitle segment loader on tech errors', function(assert) {
  1400. this.requests.length = 0;
  1401. this.player = createPlayer();
  1402. this.player.src({
  1403. src: 'manifest/master-subtitles.m3u8',
  1404. type: 'application/vnd.apple.mpegurl'
  1405. });
  1406. this.clock.tick(1);
  1407. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1408. // sets up listener for text track changes
  1409. masterPlaylistController.trigger('sourceopen');
  1410. // master, contains media groups for subtitles
  1411. this.standardXHRResponse(this.requests.shift());
  1412. // media
  1413. this.standardXHRResponse(this.requests.shift());
  1414. const textTracks = this.player.textTracks();
  1415. // enable first subtitle text track
  1416. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1417. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1418. textTracks[1].mode = 'showing';
  1419. let pauseCount = 0;
  1420. masterPlaylistController.subtitleSegmentLoader_.pause = () => pauseCount++;
  1421. this.player.tech_.trigger('error');
  1422. assert.equal(pauseCount, 1, 'paused subtitle segment loader');
  1423. });
  1424. QUnit.test('disposes subtitle loaders on dispose', function(assert) {
  1425. this.requests.length = 0;
  1426. this.player = createPlayer();
  1427. this.player.src({
  1428. src: 'manifest/master-subtitles.m3u8',
  1429. type: 'application/vnd.apple.mpegurl'
  1430. });
  1431. this.clock.tick(1);
  1432. let masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1433. assert.notOk(masterPlaylistController.subtitlePlaylistLoader_,
  1434. 'does not start with a subtitle playlist loader');
  1435. assert.ok(masterPlaylistController.subtitleSegmentLoader_,
  1436. 'starts with a subtitle segment loader');
  1437. let segmentLoaderDisposeCount = 0;
  1438. masterPlaylistController.subtitleSegmentLoader_.dispose =
  1439. () => segmentLoaderDisposeCount++;
  1440. masterPlaylistController.dispose();
  1441. assert.equal(segmentLoaderDisposeCount, 1, 'disposed the subtitle segment loader');
  1442. this.requests.length = 0;
  1443. this.player = createPlayer();
  1444. this.player.src({
  1445. src: 'manifest/master-subtitles.m3u8',
  1446. type: 'application/vnd.apple.mpegurl'
  1447. });
  1448. this.clock.tick(1);
  1449. masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1450. // sets up listener for text track changes
  1451. masterPlaylistController.trigger('sourceopen');
  1452. // master, contains media groups for subtitles
  1453. this.standardXHRResponse(this.requests.shift());
  1454. // media
  1455. this.standardXHRResponse(this.requests.shift());
  1456. const textTracks = this.player.textTracks();
  1457. // enable first subtitle text track
  1458. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1459. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1460. textTracks[1].mode = 'showing';
  1461. assert.ok(masterPlaylistController.subtitlePlaylistLoader_,
  1462. 'has a subtitle playlist loader');
  1463. assert.ok(masterPlaylistController.subtitleSegmentLoader_,
  1464. 'has a subtitle segment loader');
  1465. let playlistLoaderDisposeCount = 0;
  1466. segmentLoaderDisposeCount = 0;
  1467. masterPlaylistController.subtitlePlaylistLoader_.dispose =
  1468. () => playlistLoaderDisposeCount++;
  1469. masterPlaylistController.subtitleSegmentLoader_.dispose =
  1470. () => segmentLoaderDisposeCount++;
  1471. masterPlaylistController.dispose();
  1472. assert.equal(playlistLoaderDisposeCount, 1, 'disposed the subtitle playlist loader');
  1473. assert.equal(segmentLoaderDisposeCount, 1, 'disposed the subtitle segment loader');
  1474. });
  1475. QUnit.test('subtitle segment loader resets on seeks', function(assert) {
  1476. this.requests.length = 0;
  1477. this.player = createPlayer();
  1478. this.player.src({
  1479. src: 'manifest/master-subtitles.m3u8',
  1480. type: 'application/vnd.apple.mpegurl'
  1481. });
  1482. this.clock.tick(1);
  1483. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1484. // sets up listener for text track changes
  1485. masterPlaylistController.trigger('sourceopen');
  1486. // master, contains media groups for subtitles
  1487. this.standardXHRResponse(this.requests.shift());
  1488. // media
  1489. this.standardXHRResponse(this.requests.shift());
  1490. const textTracks = this.player.textTracks();
  1491. // enable first subtitle text track
  1492. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1493. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1494. textTracks[1].mode = 'showing';
  1495. let resetCount = 0;
  1496. let abortCount = 0;
  1497. let loadCount = 0;
  1498. masterPlaylistController.subtitleSegmentLoader_.resetEverything = () => resetCount++;
  1499. masterPlaylistController.subtitleSegmentLoader_.abort = () => abortCount++;
  1500. masterPlaylistController.subtitleSegmentLoader_.load = () => loadCount++;
  1501. this.player.pause();
  1502. masterPlaylistController.setCurrentTime(5);
  1503. assert.equal(resetCount, 1, 'reset subtitle segment loader');
  1504. assert.equal(abortCount, 1, 'aborted subtitle segment loader');
  1505. assert.equal(loadCount, 0, 'did not call load on subtitle segment loader');
  1506. this.player.play();
  1507. resetCount = 0;
  1508. abortCount = 0;
  1509. loadCount = 0;
  1510. masterPlaylistController.setCurrentTime(10);
  1511. assert.equal(resetCount, 1, 'reset subtitle segment loader');
  1512. assert.equal(abortCount, 1, 'aborted subtitle segment loader');
  1513. assert.equal(loadCount, 1, 'called load on subtitle segment loader');
  1514. });
  1515. QUnit.test('can get active subtitle group', function(assert) {
  1516. this.requests.length = 0;
  1517. this.player = createPlayer();
  1518. this.player.src({
  1519. src: 'manifest/master-subtitles.m3u8',
  1520. type: 'application/vnd.apple.mpegurl'
  1521. });
  1522. this.clock.tick(1);
  1523. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1524. assert.notOk(masterPlaylistController.activeSubtitleGroup_(),
  1525. 'no active subtitle group');
  1526. // master, contains media groups for subtitles
  1527. this.standardXHRResponse(this.requests.shift());
  1528. assert.notOk(masterPlaylistController.activeSubtitleGroup_(),
  1529. 'no active subtitle group');
  1530. // media
  1531. this.standardXHRResponse(this.requests.shift());
  1532. assert.ok(masterPlaylistController.activeSubtitleGroup_(), 'active subtitle group');
  1533. });
  1534. QUnit.test('can get active subtitle track', function(assert) {
  1535. this.requests.length = 0;
  1536. this.player = createPlayer();
  1537. this.player.src({
  1538. src: 'manifest/master-subtitles.m3u8',
  1539. type: 'application/vnd.apple.mpegurl'
  1540. });
  1541. this.clock.tick(1);
  1542. // master, contains media groups for subtitles
  1543. this.standardXHRResponse(this.requests.shift());
  1544. // media
  1545. this.standardXHRResponse(this.requests.shift());
  1546. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1547. assert.notOk(masterPlaylistController.activeSubtitleTrack_(),
  1548. 'no active subtitle track');
  1549. const textTracks = this.player.textTracks();
  1550. // enable first subtitle text track
  1551. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1552. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1553. textTracks[1].mode = 'showing';
  1554. assert.ok(masterPlaylistController.activeSubtitleTrack_(), 'active subtitle track');
  1555. });
  1556. QUnit.test('handles subtitle errors appropriately', function(assert) {
  1557. this.requests.length = 0;
  1558. this.player = createPlayer();
  1559. this.player.src({
  1560. src: 'manifest/master-subtitles.m3u8',
  1561. type: 'application/vnd.apple.mpegurl'
  1562. });
  1563. this.clock.tick(1);
  1564. // master, contains media groups for subtitles
  1565. this.standardXHRResponse(this.requests.shift());
  1566. // media
  1567. this.standardXHRResponse(this.requests.shift());
  1568. const textTracks = this.player.textTracks();
  1569. // enable first subtitle text track
  1570. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1571. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1572. textTracks[1].mode = 'showing';
  1573. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1574. let abortCalls = 0;
  1575. let setupSubtitlesCalls = 0;
  1576. masterPlaylistController.subtitleSegmentLoader_.abort = () => abortCalls++;
  1577. masterPlaylistController.setupSubtitles = () => setupSubtitlesCalls++;
  1578. masterPlaylistController.handleSubtitleError_();
  1579. assert.equal(textTracks[1].mode, 'disabled', 'set text track to disabled');
  1580. assert.equal(abortCalls, 1, 'aborted subtitle segment loader');
  1581. assert.equal(setupSubtitlesCalls, 1, 'setup subtitles');
  1582. assert.equal(this.env.log.warn.callCount, 1, 'logged a warning');
  1583. this.env.log.warn.callCount = 0;
  1584. });
  1585. QUnit.test('sets up subtitles', function(assert) {
  1586. this.requests.length = 0;
  1587. this.player = createPlayer();
  1588. this.player.src({
  1589. src: 'manifest/master-subtitles.m3u8',
  1590. type: 'application/vnd.apple.mpegurl'
  1591. });
  1592. this.clock.tick(1);
  1593. // master, contains media groups for subtitles
  1594. this.standardXHRResponse(this.requests.shift());
  1595. // media
  1596. this.standardXHRResponse(this.requests.shift());
  1597. const masterPlaylistController = this.player.tech_.hls.masterPlaylistController_;
  1598. // sets up listener for text track changes
  1599. masterPlaylistController.trigger('sourceopen');
  1600. const segmentLoader = masterPlaylistController.subtitleSegmentLoader_;
  1601. let segmentDisposeCalls = 0;
  1602. let segmentLoadCalls = 0;
  1603. let segmentPauseCalls = 0;
  1604. let segmentResetCalls = 0;
  1605. segmentLoader.load = () => segmentLoadCalls++;
  1606. segmentLoader.dispose = () => segmentDisposeCalls++;
  1607. segmentLoader.pause = () => segmentPauseCalls++;
  1608. segmentLoader.resetEverything = () => segmentResetCalls++;
  1609. assert.notOk(masterPlaylistController.subtitlePlaylistLoader_,
  1610. 'no subtitle playlist loader');
  1611. // no active text track
  1612. masterPlaylistController.setupSubtitles();
  1613. assert.equal(segmentDisposeCalls, 0, 'did not dispose subtitles segment loader');
  1614. assert.equal(segmentLoadCalls, 0, 'did not load subtitles segment loader');
  1615. assert.equal(segmentPauseCalls, 1, 'paused subtitles segment loader');
  1616. assert.equal(segmentResetCalls, 0, 'did not reset subtitle segment loader');
  1617. assert.notOk(masterPlaylistController.subtitlePlaylistLoader_,
  1618. 'no subtitle playlist loader');
  1619. assert.ok(masterPlaylistController.subtitleSegmentLoader_,
  1620. 'did not remove subtitle segment loader');
  1621. const textTracks = this.player.textTracks();
  1622. // enable first subtitle text track
  1623. assert.notEqual(textTracks[0].kind, 'subtitles', 'kind is not subtitles');
  1624. assert.equal(textTracks[1].kind, 'subtitles', 'kind is subtitles');
  1625. textTracks[1].mode = 'showing';
  1626. assert.ok(masterPlaylistController.subtitlePlaylistLoader_,
  1627. 'added a new subtitle playlist loader');
  1628. assert.equal(segmentLoader,
  1629. masterPlaylistController.subtitleSegmentLoader_,
  1630. 'did not change subtitle segment loader');
  1631. assert.equal(segmentLoadCalls, 0, 'did not load subtitles segment loader');
  1632. assert.equal(segmentResetCalls, 1, 'reset subtitle segment loader');
  1633. let playlistLoader = masterPlaylistController.subtitlePlaylistLoader_;
  1634. let playlistLoadCalls = 0;
  1635. playlistLoader.load = () => playlistLoadCalls++;
  1636. // same active text track, haven't yet gotten a response from webvtt
  1637. masterPlaylistController.setupSubtitles();
  1638. assert.equal(this.requests.length, 2, 'total of two requests');
  1639. let oldRequest = this.requests.shift();
  1640. // tracking playlist loader dispose calls by checking request aborted status
  1641. assert.ok(oldRequest.aborted, 'aborted the old request');
  1642. assert.notEqual(playlistLoader,
  1643. masterPlaylistController.subtitlePlaylistLoader_,
  1644. 'changed subtitle playlist loader');
  1645. let playlistDisposeCalls = 0;
  1646. playlistLoader = masterPlaylistController.subtitlePlaylistLoader_;
  1647. playlistLoadCalls = 0;
  1648. playlistLoader.load = () => playlistLoadCalls++;
  1649. playlistLoader.dispose = () => playlistDisposeCalls++;
  1650. this.requests.shift().respond(200, null, `
  1651. #EXTM3U
  1652. #EXT-X-TARGETDURATION:10
  1653. #EXT-X-MEDIA-SEQUENCE:0
  1654. #EXTINF:10
  1655. 0.webvtt
  1656. #EXT-X-ENDLIST
  1657. `);
  1658. segmentLoadCalls = 0;
  1659. // same active text track, got a response from webvtt playlist
  1660. masterPlaylistController.setupSubtitles();
  1661. assert.equal(playlistLoader,
  1662. masterPlaylistController.subtitlePlaylistLoader_,
  1663. 'did not change subtitle playlist loader');
  1664. assert.equal(segmentLoader,
  1665. masterPlaylistController.subtitleSegmentLoader_,
  1666. 'did not change subtitle segment loader');
  1667. assert.equal(playlistDisposeCalls, 0, 'did not dispose subtitles playlist loader');
  1668. assert.equal(playlistLoadCalls, 0, 'did not load subtitles playlist loader');
  1669. assert.equal(segmentLoadCalls, 1, 'loaded subtitles segment loader');
  1670. playlistDisposeCalls = 0;
  1671. segmentDisposeCalls = 0;
  1672. playlistLoadCalls = 0;
  1673. segmentLoadCalls = 0;
  1674. segmentPauseCalls = 0;
  1675. segmentResetCalls = 0;
  1676. // turn off active subtitle text track
  1677. textTracks[1].mode = 'disabled';
  1678. assert.equal(playlistDisposeCalls, 1, 'disposed subtitles playlist loader');
  1679. assert.equal(segmentDisposeCalls, 0, 'did not dispose subtitles segment loader');
  1680. assert.equal(playlistLoadCalls, 0, 'did not load subtitles playlist loader');
  1681. assert.equal(segmentLoadCalls, 0, 'did not load subtitles segment loader');
  1682. assert.equal(segmentPauseCalls, 1, 'paused subtitles segment loader');
  1683. assert.equal(segmentResetCalls, 0, 'did not reset subtitle segment loader');
  1684. assert.notOk(masterPlaylistController.subtitlePlaylistLoader_,
  1685. 'removed subtitle playlist loader');
  1686. assert.ok(masterPlaylistController.subtitleSegmentLoader_,
  1687. 'did not remove subtitle segment loader');
  1688. });
  1689. QUnit.test('calculates dynamic GOAL_BUFFER_LENGTH', function(assert) {
  1690. const configOld = {
  1691. GOAL_BUFFER_LENGTH: Config.GOAL_BUFFER_LENGTH,
  1692. MAX_GOAL_BUFFER_LENGTH: Config.MAX_GOAL_BUFFER_LENGTH,
  1693. GOAL_BUFFER_LENGTH_RATE: Config.GOAL_BUFFER_LENGTH_RATE
  1694. };
  1695. const mpc = this.masterPlaylistController;
  1696. let currentTime = 0;
  1697. Config.GOAL_BUFFER_LENGTH = 30;
  1698. Config.MAX_GOAL_BUFFER_LENGTH = 60;
  1699. Config.GOAL_BUFFER_LENGTH_RATE = 0.5;
  1700. mpc.tech_.currentTime = () => currentTime;
  1701. assert.equal(mpc.goalBufferLength(), 30, 'dynamic GBL uses starting value at time 0');
  1702. currentTime = 10;
  1703. assert.equal(mpc.goalBufferLength(), 35, 'dynamic GBL increases by currentTime * rate');
  1704. currentTime = 60;
  1705. assert.equal(mpc.goalBufferLength(), 60, 'dynamic GBL uses max value');
  1706. currentTime = 70;
  1707. assert.equal(mpc.goalBufferLength(), 60, 'dynamic GBL continues to use max value');
  1708. // restore config
  1709. Object.keys(configOld).forEach((key) => Config[key] = configOld[key]);
  1710. });
  1711. QUnit.test('calculates dynamic BUFFER_LOW_WATER_LINE', function(assert) {
  1712. const configOld = {
  1713. BUFFER_LOW_WATER_LINE: Config.BUFFER_LOW_WATER_LINE,
  1714. MAX_BUFFER_LOW_WATER_LINE: Config.MAX_BUFFER_LOW_WATER_LINE,
  1715. BUFFER_LOW_WATER_LINE_RATE: Config.BUFFER_LOW_WATER_LINE_RATE
  1716. };
  1717. const mpc = this.masterPlaylistController;
  1718. let currentTime = 0;
  1719. Config.BUFFER_LOW_WATER_LINE = 0;
  1720. Config.MAX_BUFFER_LOW_WATER_LINE = 30;
  1721. Config.BUFFER_LOW_WATER_LINE_RATE = 0.5;
  1722. mpc.tech_.currentTime = () => currentTime;
  1723. assert.equal(mpc.bufferLowWaterLine(), 0, 'dynamic BLWL uses starting value at time 0');
  1724. currentTime = 10;
  1725. assert.equal(mpc.bufferLowWaterLine(), 5,
  1726. 'dynamic BLWL increases by currentTime * rate');
  1727. currentTime = 60;
  1728. assert.equal(mpc.bufferLowWaterLine(), 30, 'dynamic BLWL uses max value');
  1729. currentTime = 70;
  1730. assert.equal(mpc.bufferLowWaterLine(), 30, 'dynamic BLWL continues to use max value');
  1731. // restore config
  1732. Object.keys(configOld).forEach((key) => Config[key] = configOld[key]);
  1733. });
  1734. QUnit.module('Codec to MIME Type Conversion');
  1735. const testMimeTypes = function(assert, isFMP4) {
  1736. let container = isFMP4 ? 'mp4' : 'mp2t';
  1737. let videoMime = `video/${container}`;
  1738. let audioMime = `audio/${container}`;
  1739. // no MAAT
  1740. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1741. generateMedia(false, true, false, false, isFMP4)),
  1742. [`${videoMime}; codecs="avc1.4d400d, mp4a.40.2"`],
  1743. `no MAAT, container: ${container}, codecs: none`);
  1744. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1745. generateMedia(false, true, true, false, isFMP4)),
  1746. [`${videoMime}; codecs="avc1.deadbeef"`],
  1747. `no MAAT, container: ${container}, codecs: video`);
  1748. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1749. generateMedia(false, true, false, true, isFMP4)),
  1750. [`${audioMime}; codecs="mp4a.40.E"`],
  1751. `no MAAT, container: ${container}, codecs: audio`);
  1752. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1753. generateMedia(false, true, true, true, isFMP4)),
  1754. [`${videoMime}; codecs="avc1.deadbeef, mp4a.40.E"`],
  1755. `no MAAT, container: ${container}, codecs: video, audio`);
  1756. // MAAT, not muxed
  1757. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1758. generateMedia(true, false, false, false, isFMP4)),
  1759. [`${videoMime}; codecs="avc1.4d400d"`,
  1760. `${audioMime}; codecs="mp4a.40.2"`],
  1761. `MAAT, demuxed, container: ${container}, codecs: none`);
  1762. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1763. generateMedia(true, false, true, false, isFMP4)),
  1764. [`${videoMime}; codecs="avc1.deadbeef"`,
  1765. `${audioMime}; codecs="mp4a.40.2"`],
  1766. `MAAT, demuxed, container: ${container}, codecs: video`);
  1767. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1768. generateMedia(true, false, false, true, isFMP4)),
  1769. [`${videoMime}; codecs="mp4a.40.E"`,
  1770. `${audioMime}; codecs="mp4a.40.E"`],
  1771. `MAAT, demuxed, container: ${container}, codecs: audio`);
  1772. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1773. generateMedia(true, false, true, true, isFMP4)),
  1774. [`${videoMime}; codecs="avc1.deadbeef"`,
  1775. `${audioMime}; codecs="mp4a.40.E"`],
  1776. `MAAT, demuxed, container: ${container}, codecs: video, audio`);
  1777. // MAAT, muxed
  1778. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1779. generateMedia(true, true, false, false, isFMP4)),
  1780. [`${videoMime}; codecs="avc1.4d400d, mp4a.40.2"`,
  1781. `${audioMime}; codecs="mp4a.40.2"`],
  1782. `MAAT, muxed, container: ${container}, codecs: none`);
  1783. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1784. generateMedia(true, true, true, false, isFMP4)),
  1785. [`${videoMime}; codecs="avc1.deadbeef, mp4a.40.2"`,
  1786. `${audioMime}; codecs="mp4a.40.2"`],
  1787. `MAAT, muxed, container: ${container}, codecs: video`);
  1788. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1789. generateMedia(true, true, false, true, isFMP4)),
  1790. [`${videoMime}; codecs="mp4a.40.E"`,
  1791. `${audioMime}; codecs="mp4a.40.E"`],
  1792. `MAAT, muxed, container: ${container}, codecs: audio`);
  1793. assert.deepEqual(mimeTypesForPlaylist_.apply(null,
  1794. generateMedia(true, true, true, true, isFMP4)),
  1795. [`${videoMime}; codecs="avc1.deadbeef, mp4a.40.E"`,
  1796. `${audioMime}; codecs="mp4a.40.E"`],
  1797. `MAAT, muxed, container: ${container}, codecs: video, audio`);
  1798. };
  1799. QUnit.test('recognizes muxed codec configurations', function(assert) {
  1800. testMimeTypes(assert, false);
  1801. testMimeTypes(assert, true);
  1802. });
  1803. QUnit.module('Map Legacy AVC Codec');
  1804. QUnit.test('maps legacy AVC codecs', function(assert) {
  1805. assert.equal(mapLegacyAvcCodecs_('avc1.deadbeef'),
  1806. 'avc1.deadbeef',
  1807. 'does nothing for non legacy pattern');
  1808. assert.equal(mapLegacyAvcCodecs_('avc1.dead.beef, mp4a.something'),
  1809. 'avc1.dead.beef, mp4a.something',
  1810. 'does nothing for non legacy pattern');
  1811. assert.equal(mapLegacyAvcCodecs_('avc1.dead.beef,mp4a.something'),
  1812. 'avc1.dead.beef,mp4a.something',
  1813. 'does nothing for non legacy pattern');
  1814. assert.equal(mapLegacyAvcCodecs_('mp4a.something,avc1.dead.beef'),
  1815. 'mp4a.something,avc1.dead.beef',
  1816. 'does nothing for non legacy pattern');
  1817. assert.equal(mapLegacyAvcCodecs_('mp4a.something, avc1.dead.beef'),
  1818. 'mp4a.something, avc1.dead.beef',
  1819. 'does nothing for non legacy pattern');
  1820. assert.equal(mapLegacyAvcCodecs_('avc1.42001e'),
  1821. 'avc1.42001e',
  1822. 'does nothing for non legacy pattern');
  1823. assert.equal(mapLegacyAvcCodecs_('avc1.4d0020,mp4a.40.2'),
  1824. 'avc1.4d0020,mp4a.40.2',
  1825. 'does nothing for non legacy pattern');
  1826. assert.equal(mapLegacyAvcCodecs_('mp4a.40.2,avc1.4d0020'),
  1827. 'mp4a.40.2,avc1.4d0020',
  1828. 'does nothing for non legacy pattern');
  1829. assert.equal(mapLegacyAvcCodecs_('mp4a.40.40'),
  1830. 'mp4a.40.40',
  1831. 'does nothing for non video codecs');
  1832. assert.equal(mapLegacyAvcCodecs_('avc1.66.30'),
  1833. 'avc1.42001e',
  1834. 'translates legacy video codec alone');
  1835. assert.equal(mapLegacyAvcCodecs_('avc1.66.30, mp4a.40.2'),
  1836. 'avc1.42001e, mp4a.40.2',
  1837. 'translates legacy video codec when paired with audio');
  1838. assert.equal(mapLegacyAvcCodecs_('mp4a.40.2, avc1.66.30'),
  1839. 'mp4a.40.2, avc1.42001e',
  1840. 'translates video codec when specified second');
  1841. });