Skip to content

Commit

Permalink
bug: fix protocol choice to load source video
Browse files Browse the repository at this point in the history
  • Loading branch information
cgilly2fast committed Aug 29, 2024
1 parent f53e295 commit 34fb731
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ const DefaultResolutions = [

## Example Front-end Usage

Any video player that can play .m3u8 files can be used. Here is a simple example using the `react-hls-player`.
Any video player that can play .m3u8 files can be used. Here is a simple example using the `react-hls-video-player`. View docs for [react-hls-video-player here.]('https://github.com/cgilly2fast/react-hls')
```tsx
import React, { useRef, useState } from 'react';
import ReactHlsPlayer from 'react-hls-player';
import ReactHlsPlayer from 'react-hls-video-player';

const SimpleHlsPlayer = () => {
const playerRef = useRef(null);
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
"clean": "rimraf dist && rimraf dev/yarn.lock",
"prepublishOnly": "yarn clean && yarn build && cd dev && yarn test"
},
"author": "[email protected]",
"license": "MIT",
"author": "Colby Gilbert",
"license": "MIT",
"bugs": {
"url": "https://github.com/cgilly2fast/plugin-adaptive-bitrate-videos/issues"
},
"peerDependencies": {
"payload": "^2.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions src/endpoints/ProcessVideo/service/sliceVideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export async function sliceVideo(
const copiedVideoPath = path.join(tempOutputDir, `${path.basename(inputPath)}`)
await new Promise<void>((resolveCopy, rejectCopy) => {
const file = fs.createWriteStream(copiedVideoPath)
console.log(copiedVideoPath)
const protocol = copiedVideoPath.toLowerCase().startsWith('https:') ? https : http
protocol.get(inputPath, resp => {
resp.pipe(file)
Expand Down

0 comments on commit 34fb731

Please sign in to comment.