<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <title>视频播放</title> <style> body { margin: 0; } </style> </head> <script> </script> <body onbeforeunload="stopPlay()"> <script src="../ezuikit.js"></script> <script src="../js/jquery.min.js"></script> <div id="playWind" style="width: 600px; height: 400px;"> </div> <script> const accessToken = "at.6guiwhzu5bwjxkjr0wlc6unv0sy80mmy-13ka6v9ou2-137p76e-ufyrw4c73"; let ezPlay = {}; $(document).ready(function() { const url = window.location.href.split("=")[1]; ezPlay = new EZUIKit.EZUIPlayer({ id: 'playWind', autoplay: true, url: url, accessToken: accessToken, decoderPath: "/static/ezPlay", width: 600, height: 400 }); }); function stopPlay() { ezPlay.stop(); } </script> </body> </html>