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 fs from 'fs'; | |
import crypto from 'crypto'; | |
const FILE_SIZE_MB = Number(process.env.SIZE) || 60; | |
const BYTES_PER_MB = 1024 * 1024; | |
const TARGET_SIZE = FILE_SIZE_MB * BYTES_PER_MB; | |
// Configuración de columnas | |
const columns = [ | |
'id', |
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
from pymediainfo import MediaInfo | |
import json | |
# Path to your video file | |
video_path = 'example_with_metadata.webm' | |
# Extract metadata | |
media_info = MediaInfo.parse(video_path) | |
# Display metadata as JSON |
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
class MyCustomWebSocket extends WebSocket { | |
constructor(url) { | |
super(url); | |
} | |
} | |
const websocket = new MyCustomWebSocket('wss://websocket-test.videsk.workers.dev/'); |
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 style = document.createElement('style'); | |
style.innerHTML = ` | |
/* Add CSS */ | |
`; | |
document.querySelector('.videsk-home-iframe iframe').contentDocument.head.appendChild(style): |
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 { VideoFrameEvents } from '@/utils/constants/events'; | |
import { Customer } from '@/utils/constants/classes'; | |
import LoadingBox from '@/components/commons/LoadingBox'; | |
import ErrorCard from '@/components/commons/ErrorCard'; | |
const VIDEO_FRAME_WRAPPER = 'video-frame-wrapper'; | |
const VIDESK_COMPONENT = 'videsk-webrtc'; | |
const VIDESK_TOKEN = process.env.VIDESK_TOKEN; | |
const VIDESK_SEGMENT= 'Videoatención Oficina'; |
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
// Chrome Canary M74 | |
// chrome://flags で Experimental Web Platform features を有効にすれば使えるようになる | |
// mDNS を有効にしていると上手く動かないかもしれないので要注意 | |
// https://developers.google.com/web/updates/2019/01/rtcquictransport-api | |
// https://github.com/shampson/RTCQuicTransport-Origin-Trial-Documentation | |
const iceTransport1 = new RTCIceTransport; | |
const iceTransport2 = new RTCIceTransport; |
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
function amplify(node, gain) { | |
const audioCtx = new AudioContext(); | |
const source = audioCtx.createMediaElementSource(node); | |
// create a gain node | |
const gainNode = audioCtx.createGain(); | |
gainNode.gain.value = gain; | |
source.connect(gainNode); | |
// connect the gain node to an output destination |
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
function getSearchParams() { | |
const { search } = window.location; | |
const params = new URLSearchParams(search); | |
const query = {}; | |
params.forEach((value, key) => { | |
query[key] = value; | |
}); | |
return query; | |
} |
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
Object.prototype.stringGet = function(string, object = this) { | |
string = string.replace(/\[(\w+)]/g, '.$1'); // convert indexes to properties | |
string = string.replace(/^\./, ''); // strip a leading dot | |
const array = string.split('.'); | |
array.forEach((key) => { | |
if (key in object) object = object[key]; | |
}); | |
return object; | |
} |
NewerOlder