# dashFront **Repository Path**: vesper0407/dash-front ## Basic Information - **Project Name**: dashFront - **Description**: 播放器前端 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-08 - **Last Updated**: 2021-10-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dashfront ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). conf位置 /usr/local/etc/nginx/nginx.conf 执行位置 /usr/local/bin/nginx ### 端口占用 1. lsof -i:8080 2. kill -9 [process id] ### rtmp推流 **platform-independent** - ffmpeg -re -i guitar.mp4 -vcodec libx264 -acodec aac -strict -2 -f flv rtmp://localhost:1935/myapp/guitar ### 指定nginx配置文件位置 - nginx -c /usr/local/etc/nginx/nginx.conf - nginx -s reload - nginx -s quit - nginx -s stop - /tmp/dash/first/first.mpd 存放分片视频段 以及 mpd文件 - /tmp/live/xxx.mpd. 本地视频推流mpd rtmp://localhost:1935/myapp/xxx - /tmp/cacheLiveVideo 存放用于推流的原视频 - /tmp/cacheDashVideo 存放用于dash播放的平面原视频 - /tmp/cachePanoramaVideo 全景视频 - /tmp/processShell 处理平面视频脚本 - /tmp/panoramaShell 处理全景视频脚本 http://localhost:8080/live/xxx.mpd ### 开启 vr-tiled-dash-player - cd /path/to/vr-dash-tile-player - http-server --cors -p 9999 ### 杀死脚本进程 - pgrep -f 'sh ./process.sh' - kill -9 #pid ### 数据库备份 mysqldump --databases dashVR -u root -p > ~/desktop/dashVR.sql ### 前端文件下载 1. 类似网址的下载 http://xxx.xxx/xxx.file ```javascript const link = document.createElement('a');//创建a标签 // link.download = filename;//a标签添加属性 link.style.display = 'none'; link.href = url; document.body.appendChild(link); link.click();//执行下载 console.log('文件下载成功'); this.$message.success(`文件 ${url} 已经下载成功啦~`) URL.revokeObjectURL(link.href); //释放url document.body.removeChild(link);//释放标签 ``` 2. 从后端接收blob或者浏览器自己在内存中创建blob ```javascript let link = document.createElement('a'); link.download = 'hello.txt'; // 注意这里第一个参数是数组 let blob = new Blob(['Hello, world!'], {type: 'text/plain'}); link.href = URL.createObjectURL(blob); link.click(); //手动释放掉 防止占用内存 URL.revokeObjectURL(link.href); ``` ### cdn引入 ```javascript ```