Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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: 26 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run build --if-present
npm test
env:
CI: true
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4 changes: 3 additions & 1 deletion m3u/AttributeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ var dataTypes = AttributeList.dataTypes = {
'title' : 'enumerated-string',
'type' : 'enumerated-string',
'uri' : 'quoted-string',
'video' : 'quoted-string'
'video' : 'quoted-string',
'cueout' : 'decimal-integer',
'cuein' : 'boolean'
};

AttributeList.prototype.mergeAttributes = function mergeAttributes(attributes) {
Expand Down
2 changes: 1 addition & 1 deletion m3u/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var Item = module.exports = function Item(attributes) {
discontinuity : null,
duration : null,
title : null,
uri : null
uri : null,
};
};

Expand Down
7 changes: 7 additions & 0 deletions m3u/PlaylistItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ PlaylistItem.prototype.toString = function toString() {
if (this.get('discontinuity')) {
output.push('#EXT-X-DISCONTINUITY');
}
if (this.get('cueout')) {
var duration = this.get('cueout');
output.push('#EXT-X-CUE-OUT:DURATION=' + duration);
}
if (this.get('cuein')) {
output.push('#EXT-X-CUE-IN');
}
if (this.get('date')) {
var date = this.get('date');
if (date.getMonth) {
Expand Down
Loading