File: examples/simple_localvideo.html

Recommend this page to a friend!
  Classes of Andras Toth   Expert JS Camera Capture   examples/simple_localvideo.html   Download  
File: examples/simple_localvideo.html
Role: Example script
Content type: text/plain
Description: Documentation
Class: Expert JS Camera Capture
Capture video and audio and save to files
Author: By
Last change: V 2.0.0

-add Jquery version
-some minor bug fixed
Date: 2 years ago
Size: 1,756 bytes
 

Contents

Class file image Download
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>ExpertCamJS</title> <style type="text/css"> .video-container{ display: inline-block; position: relative; } ::cue { font-family: cursive; text-shadow: 2px 2px 2px black; color:#fff; background-color: rgba(255, 255, 255, 0); } </style> </head> <body> <hr> <h1 style="text-align:center;">Initialize with arguments and play local video with subtitle</h1> <hr> <div class="video-container"> <video preload="auto"></video> </div> <hr> Open video and subtitle (multiselect, subtitle is optional, currently only srt is supported) <hr> <button type="button" onclick="openVideo();">Open</button> <button type="button" onclick="goFullScreen();">Fullsreen</button> <hr> <script type="text/javascript" src="../js/expertcam.js"></script> <script type="text/javascript"> var args = { //path correction noSignal: '/media/no_signal.png', width: '100%', height: '100%', constraints: { video: false, audio: false }, subTitleCoding: 'windows-1252' }; var cam = new ExpertCamJS('video').init(args); function openVideo(){ cam.playLocalVideo(); } function goFullScreen(){ if(cam){ cam.toggleFullScreen(); } } </script> </body> </html>