Skip to content

Commit

Permalink
fix: 视频无法播放的问题(#118
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Sep 28, 2024
1 parent 98cbf72 commit 1e637f3
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ jobs:
ls -l
- name: Upload artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3
with:
# Artifact name
name: wechat-devtools-${{ matrix.ARCH }}.src
path: tmp/src

- name: Upload artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3
with:
# Artifact name
name: wechat-devtools-${{ matrix.ARCH }}.build
Expand All @@ -110,7 +110,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Prepare
run: |
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
ls -l
- name: Upload artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3
with:
# Artifact name
name: wechat-devtools-${{ matrix.ARCH }}.build
Expand All @@ -165,7 +165,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Generate TAG
id: Tag
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
env WINE=false tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
- name: Upload artifact
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3
with:
# Artifact name
name: wechat-devtools-${{ matrix.ARCH }}.build
Expand All @@ -219,7 +219,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Inspect directory after downloading artifacts
run: ls -alFR

Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.06.2405020-4 / 2024-09-28

- fix: 视频无法播放的问题(#118

# 1.06.2405020-3 / 2024-08-10

- update: compiler(Linux) v0.1.1
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /workspace

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
mkdir -p /build_temp/python36 /build_temp/nodejs && \
apt update && \
Expand All @@ -27,7 +28,7 @@ RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
./setup_16.x &&\
apt-get install -y nodejs &&\
rm -rf /build_temp && \
apt install -y gosu && \
apt install -y gosu unzip python && \
gosu nobody true && \
useradd -s /bin/bash -m user

Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
| 赞赏人 | 赞赏 | 时间 |
|-------|---------|-----|
| [shao4598](https://github.com/shao4598) | 50.00¥ | 2024-09-24 |
| [OWALabuy](https://github.com/OWALabuy) | 16.66¥ | 2024-08-28 |
| [wangvation](https://github.com/wangvation) | 50.00¥ | 2024-07-16 |
| 孤泉冷月 | 100.00¥ | 2024-07-12 |
| [liushuai05](https://github.com/liushuai05) | 88.00¥ | 2023-12-26 |
Expand Down
9 changes: 9 additions & 0 deletions test/nw-simple/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- <video src="https://vjs.zencdn.net/v/oceans.mp4"></video> -->
<hr />
<video autoplay width="320" height="240" controls>
<source src="https://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4">
您的浏览器不支持 HTML5 video 标签。
</video>
<script>
// window.open('chrome://media-internals/')
</script>
4 changes: 4 additions & 0 deletions test/nw-simple/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "test",
"main": "index.html"
}
2 changes: 1 addition & 1 deletion tools/build-with-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

root_dir=$(cd `dirname $0`/.. && pwd -P)
echo "$(id -u):$(id -g)"
docker run -u "$(id -u):$(id -g)" --rm -i -e "ACTION_MODE=${ACTION_MODE:-false}" -w /workspace -v "$root_dir:/workspace" jiyecafe/wechat-devtools-build:v3 \
docker run -u "$(id -u):$(id -g)" --rm -i -e "ACTION_MODE=${ACTION_MODE:-false}" -w /workspace -v "$root_dir:/workspace" jiyecafe/wechat-devtools-build:v1.0.4 \
bash ./docker/entrypoint
9 changes: 9 additions & 0 deletions tools/fix-other.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -ex
root_dir=$(cd `dirname $0`/.. && pwd -P)
srcdir=$root_dir
tmp_dir="$root_dir/tmp"
nwjs_dir="$root_dir/nwjs"
package_dir="$root_dir/package.nw"

# 修复: webview manager
Expand Down Expand Up @@ -55,6 +56,14 @@ cd "${package_dir}/node_modules/wcc/build/Release" && rm -rf wcsc.node && mv wcs
# 修复mock按钮无反应
sed -i '1s/^/window.prompt = parent.prompt;\n/' "${package_dir}/js/ideplugin/devtools/index.js"

# 修复视频无法播放
if [ ! -f "${srcdir}/cache/libffmpeg-0.55.00-linux-x64.zip" ];then
wget -c https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt/releases/download/0.55.0/0.55.0-linux-x64.zip -O "${srcdir}/cache/libffmpeg-0.55.00-linux-x64.zip.tmp"
mv "${srcdir}/cache/libffmpeg-0.55.00-linux-x64.zip.tmp" "${srcdir}/cache/libffmpeg-0.55.00-linux-x64.zip"
fi
rm -rf "${nwjs_dir}/lib/libffmpeg.so"
unzip "${srcdir}/cache/libffmpeg-0.55.00-linux-x64.zip" -d "${nwjs_dir}/lib"

current=`date "+%Y-%m-%d %H:%M:%S"`
timeStamp=`date -d "$current" +%s`
echo $timeStamp > "${package_dir}/.build_time"
Expand Down
7 changes: 5 additions & 2 deletions tools/push-docker.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
root_dir=$(cd `dirname $0`/.. && pwd -P)
set -ex

cd $root_dir/docker
docker build . --name jiyecafe/wechat-devtools-build:latest
# docker tag wechat-web-devtools-linux_wechat_devtools jiyecafe/wechat-devtools-build:latest
docker build . -t jiyecafe/wechat-devtools-build:v1.0.4
docker tag jiyecafe/wechat-devtools-build:v1.0.4 jiyecafe/wechat-devtools-build:latest
docker push jiyecafe/wechat-devtools-build:v1.0.4
docker push jiyecafe/wechat-devtools-build:latest

0 comments on commit 1e637f3

Please sign in to comment.