Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c2f8795
Add suport for subtitle media groups
gesinger Feb 25, 2017
f48c9d3
Default to target duration for rate
gesinger Feb 25, 2017
8d2b463
Fix live generated overflow for short playlists
gesinger Feb 25, 2017
80d9466
Update rate comment
gesinger Feb 27, 2017
45ad8eb
Change tense in rate comment
gesinger Feb 27, 2017
1f134a3
Merge pull request #3 from gesinger/fix-murphy-vtt
mjneil Feb 28, 2017
3d5f1b6
rename to @videojs/murphy
gkatsev Feb 22, 2018
4bdfd50
0.0.3
gkatsev Feb 22, 2018
95660ba
fix vtt and map tags, remove local files in favor of remote
Feb 23, 2018
d3cd312
Merge pull request #7 from videojs/fix-vtt-map
mjneil Feb 23, 2018
43044ab
Added shorter version of planet manifests
mrocajr Apr 3, 2018
a9717c5
Initial minimal support for date-time tag
mrocajr Apr 3, 2018
10e3d51
- Added DateTime tag field to planet manifests
mrocajr Apr 5, 2018
ee0c079
Set debug to 0
mrocajr Apr 5, 2018
4bcf4c1
Removed unnecessarily console.log
mrocajr Apr 5, 2018
a8d1199
- Included code to calculate a more accurate datetime adjustment
mrocajr Apr 6, 2018
5529ddd
Handle cases where event and calculatedDuration are undefined
mrocajr Apr 6, 2018
4eb32fd
Changes based on CR
mrocajr Apr 11, 2018
837960f
Changes based on CR
mrocajr Apr 17, 2018
d478253
Add EXT-X-PROGRAM-DATE-TIME and event window support
mrocajr Apr 17, 2018
2735873
Single rendition prototype
mrocajr Apr 23, 2018
e65be56
- master external prototype
mrocajr Apr 24, 2018
45ae299
Interim push
mrocajr Apr 24, 2018
33cc1a4
Add baseurl to subtitle and audio uri
mrocajr Apr 25, 2018
fcd3f36
Make compatible with local files
mrocajr Apr 25, 2018
3448df7
parsing fmp4
ishita12 Apr 25, 2018
64ecfc8
cleaning up the code
ishita12 Apr 26, 2018
c1ae7be
fixing a test
ishita12 Apr 26, 2018
c61d98c
Updating the README
ishita12 Apr 26, 2018
8ba253f
Remove debugger line and fix spacing
mrocajr Apr 27, 2018
340f9ba
Minor readme tweaks
mrocajr Apr 27, 2018
a32f7ee
version change
mrocajr Apr 30, 2018
298bde4
Changes based on CR
mrocajr May 9, 2018
b0d7d42
Changes based on CR
mrocajr May 9, 2018
b032501
Changes based on CR
mrocajr May 9, 2018
5b49d59
Convert external HLS VOD stream into livestream
mrocajr May 9, 2018
901ba51
Merge branch 'master' into master
mrocajr May 9, 2018
ab340cd
0.1.1
May 10, 2018
4161e2e
Adjust manifestUrl when non-relative path us used
mrocajr Jun 6, 2018
066a498
Added other resource name possibilites to detect when breaking out of…
mrocajr Oct 5, 2018
76b9f4d
Revert relative path fix until it can be implemented properly.
mrocajr Oct 5, 2018
d2c55ea
Merge pull request #11 from videojs/fix-header
mrocajr Oct 5, 2018
9c9bee4
Fixed typo based on code review comments.
mrocajr Oct 8, 2018
2741f7b
live-hls: fix parseQueryString to use builtin querystring module.
kunalg Nov 16, 2018
55921a1
live-hls: readability fixes.
kunalg Nov 16, 2018
c75f6ad
live-hls: some more readability fixes - no functionality changes.
kunalg Nov 19, 2018
b08483c
Merge pull request #12 from kunalg/master
mrocajr Nov 19, 2018
1f05dee
live-hls: some more readability fixes.
kunalg Nov 24, 2018
c5a5144
Merge pull request #14 from kunalg/master
mrocajr Nov 26, 2018
460bb0b
- Added calculation of discontinuity sequence when there's an existin…
mrocajr Dec 19, 2018
dae00a1
- Add disco after overflow
mrocajr Dec 19, 2018
0053d14
adjust discoseq calculation
mrocajr Dec 20, 2018
9f11912
adjust discoseq calculation
mrocajr Dec 20, 2018
9430166
Fixed discontinuity during loop back to beginning of the manifest
mrocajr Dec 20, 2018
7a81033
Removed commented code
mrocajr Dec 20, 2018
3b7fca2
Fixed discoseq calculation
mrocajr Dec 20, 2018
6a896b2
Add paranthesis to calculation
mrocajr Dec 20, 2018
eb6ab70
Hopefully the final fix to the discoseq calculation
mrocajr Dec 20, 2018
0d6d384
Removed console.log
mrocajr Jan 3, 2019
810eb9a
Spacing
mrocajr Jan 3, 2019
07ed6a7
Added changes based on code review
mrocajr Jan 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
node_modules
npm-debug.log
# OS
Thumbs.db
ehthumbs.db
Desktop.ini
.DS_Store
._*

# Editors
*~
*.swp
*.tmproj
*.tmproject
*.sublime-*
.idea/
.project/
.settings/
.vscode/

# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules/
49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,65 @@ The main murphy repository is now hosted at the following location: https://gith
# murphy
Proactively making Murphy's law a reality...

```sh
npm install @videojs/murphy
```

## How to use
Start the server using 'npm start'
Run the unit tests using 'npm test'

## Live stream error simulator
Murphy, the live stream error simulator, will take an HLS VOD playlist and simulate a
Murphy, the live stream error simulator, will take an HLS VOD playlist and simulate a
shifting livestream resource window.

In the path to the manifest with `live/`. If you wanted to try a live version of `http://localhost:9191/data/apple/gear4/prog_index.m3u8`,
for instance, you would request `http://localhost:9191/live/apple/gear4/prog_index.m3u8`
## Online manifest
For external master url use the master path and the url query parameter like this
`http://localhost:9191/master?url=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8`.

You can also add an optional event parameter which can point to event or live. The default one is live.
The live endpoint stream is a sliding window live stream and the event endpoint stream is appending window stream.
`http://localhost:9191/master?event=event&url=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8`
It takes an optional argument of event at the end

For an external sliding window single rendition stream point to the live path
`http://localhost:9191/live?url=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/v2/prog_index.m3u8`

For an external appending window single rendition stream point to to the event path
`http://localhost:9191/event?url=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/v2/prog_index.m3u8`


The Live Stream simulator also takes into account multiple renditions. To access the master playlist, the following master file points to four
live simulated renditions of apple bipbop. `http://localhost:9191/master/apple/bipbopall.m3u8`
## Local Manifest
In the path to the manifest with `live/`. If you wanted to try a live version of `http://localhost:9191/data/maat/bunny/video/video.m3u8`,
for instance, you would request `http://localhost:9191/data/maat/bunny/video/video.m3u8`

Currently, it is possible to inject 404 errors into the live stream by opening another browser instance and replacing the 'test' path of the
The Live Stream simulator also takes into account multiple renditions. To access the master playlist, the following master file points to four
live simulated renditions of maat planet. `http://localhost:9191/master/maat/planet.m3u8`

Currently, it is possible to inject 404 errors into the live stream by opening another browser instance and replacing the 'test' path of the
rendition with 'error' and adding a variable to the link. At the moment, tsnotfound and manifestnotfound are the two types of variables that can
be added with the value being the number of 404 errors that will be injected.
be added with the value being the number of 404 errors that will be injected.

For example, the following link will inject a 404 error on one ts file associated with the specified rendition in the link:
`http://localhost:9191/error/apple/gear4/prog_index.m3u8?tsnotfound=1`
`http://localhost:9191/error/maat/bunny/video/video.m3u8?tsnotfound=1`

In order to reset a livestream, use the resetStream variable. If this variable is set to 1, it will restart the target stream.
If the target stream is a master manifest, it will reset each rendition in the manifest. If this variable is set to 2,
all streams will be restarted.

For example, this following link will restart all renditions in the master manifest:
`http://localhost:9191/master/apple/bipbopall.m3u8?resetStream=1`
`http://localhost:9191/master/maat/planet.m3u8?resetStream=1`

In order to stop all streams, use the stopStream variable. If this variable is set to 1, it will stop the target stream.
If the target stream is a master manifest, it will stop each rendition in the manifest. If this variable is set to 2,
all streams will be stopped. You can start the stream normally by requesting the manifest again in the future.

For example, this following link will stop all renditions in the master manifest:
`http://localhost:9191/master/apple/bipbopall.m3u8?stopStream=1`
`http://localhost:9191/master/maat/planet.m3u8?stopStream=1`

If you would like to see a barebones UI that shows which streams are currently being simulated, go to the following link:
If you would like to see a barebones UI that shows which streams are currently being simulated, go to the following link:
`http://localhost:9191/ui/index.html`

Added support for multiple alternate audio. Here is a sample maat playlist:
`http://localhost:9191/master/maat/bunnyplaylist.m3u8`

Note: At default, no streams are simulated when the server is started. A simulation will begin as soon as there is a request for one.

## To Do:
Expand All @@ -54,4 +72,3 @@ Note: At default, no streams are simulated when the server is started. A simula


Note: This design is partially based on earlier work by David LaPalomento

Loading