This file contains 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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains 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
export default function TestScreen() { | |
const janus = React.useRef(null); | |
const videoRoom = React.useRef(null); | |
const [stream, setStream] = React.useState(null); | |
const [publishers, setPublishers] = React.useState([]); | |
React.useEffect(() => { | |
async function init() { |
This file contains 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 prepareWebrtcPeer(handleId, callbacks) { | |
callbacks = callbacks || {}; | |
callbacks.success = (typeof callbacks.success == "function") ? callbacks.success : Janus.noop; | |
callbacks.error = (typeof callbacks.error == "function") ? callbacks.error : webrtcError; | |
callbacks.dangerouslyCustomizeSdp = (typeof callbacks.dangerouslyCustomizeSdp == "function") ? callbacks.dangerouslyCustomizeSdp : Janus.noop; | |
... | |
if (jsep) { | |
if (!config.pc) { | |
Janus.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"); | |
callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep"); |
This file contains 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
OpenVPN connection setup | |
sudo apt-get install network-manager-openvpn | |
sudo apt-get install network-manager-openvpn-gnome | |
save *.ovpn config somwhere | |
network settings -> VPN -> + -> load from file -> *.ovpn | |
OpenVPN connection autostart |