H5 live

At present, many live and on-demand video programs have requirements of H5 clients. Traditional security industry Internet phones also need to be able to achieve H5 live broadcast and playback in all kinds of Windows and mobile terminals, wechat and other browsers.

The front-end adaptation

Because Windows and all kinds of mobile terminal resolution, size and so on are not the same, so in the realization of H5 playback page needs to be adapted according to different terminals, the election of the appropriate display mode. The following is the H5 code extracted from LiveNVR’s mobile Internet live broadcast scheme for traditional security cameras.

function isPC() {
         var ua = navigator.userAgent.toLowerCase();
         var agents = ["android", "iphone",
             "symbianos", "windows phone",
             "ipad", "ipod"
         ];
         var flag = true;
         for (var v in agents) {
             if (ua.indexOf(agents[v]) > 0) {
                 flag = false;
                 break;
             }
         }
         return flag;
     }
Copy the code

download

LiveNVR is to achieve the traditional security RTSP camera in the Internet live broadcast, video, playback, compatible with Windows and mobile terminals. You can find it at gitee.com/liveqing/Re… Download the LiveNVR test.

For more information

Mail: [email protected]

Technical exchange QQ group: 947137753

Consultation telephone: 15156896292 (same as wechat)

Trial download: gitee.com/liveqing/Re…

LiveQing Video streaming media without plug-ins live streaming solution: www.liveqing.com

Copyright © LiveQing Team 2016-2019