This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import "shaka-player/dist/controls.css"; | |
import shaka from "shaka-player/dist/shaka-player.ui.js"; | |
const initPlayer = async ( | |
pVideoRef | |
) => { | |
const ui = pVideoRef["ui"]; | |
const config = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = [ | |
{ | |
type: "moving", | |
times: [ | |
{ starting_time: 1355752800000, ending_time: 1355759900000 }, | |
{ starting_time: 1355767900000, ending_time: 1355774400000 }, | |
{ starting_time: 1355752800000, ending_time: 1355759900000 }, | |
{ starting_time: 1355767900000, ending_time: 1355774400000 }, | |
{ starting_time: 1355752800000, ending_time: 1355759900000 }, | |
{ starting_time: 1355767900000, ending_time: 1355774400000 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react' | |
const useMediaDownload = (src: string) => { | |
const [loading, setLoading] = React.useState(false) | |
const [url, setUrl] = React.useState<string>() | |
React.useEffect(() => { | |
if (!src) return | |
;(async () => { | |
setLoading(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use flate2::write::GzEncoder; | |
use flate2::Compression; | |
use std::env::args; | |
use std::fs::{create_dir, metadata, read_dir, File}; | |
use std::io::{copy, BufReader}; | |
use std::path::{Path, PathBuf}; | |
use std::time::Instant; | |
fn main() { | |
if args().len() < 3 { |