Coder Social home page Coder Social logo

Comments (19)

alyzhao avatar alyzhao commented on August 17, 2024 1

@nszbf 测了下这两个地址都是能按照 xxx.mp4 去存储 localStorage 的, 我这边是好的啊。你是拷贝的代码直接用的还是, 用那个在线的播放器组件地址的?

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

正则有点问题=。=

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

那你打印下 player.getOptions().source 的值看一下

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao 好了,我问了官方,vid目前不支持记忆播放,我通过自定义组件解决了

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

@nszbf 主要我用我的 vid 和 playauth 播放是支持的, 正则是正确的。所以我想看看 你获得的 player.getOptions().source 是什么样的, 这样才能完善正则啊。

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

@nszbf 现在如果vid存在会根据vid去存储播放时间, 但是我用 vid 去播放的话, source 的 mp4 地址是一样的话是记忆记录是正确的, 看你打印出来的话 /?.*$/, 视频地址也是相同的, 除非 source 中有换行符, 正则匹配不到, **所以希望能贴出 player.getOptions().source **, 以便在不用 vid 播放的时候, source 记录播放时间更准确,

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao 嗯 player.getOptions().source 就是我那个第一张图
image

你那里是可以的? 官方回答都是不行的额...,
能贴下你的 player.getOptions().source后的值吗?

这是当时工单的回答
image

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

@nszbf 可以复制两个, 完整的地址么?我测试一下

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao
https://outin-7dd6c2dd04bc11e9827300163e1c91c8.oss-cn-shanghai.aliyuncs.com/d095c658fc4e4333b9eed4d41259bd53/8a5cb48d0ba545b4861a405fa1484330-dc3dc8639d4721ef909a91ab2c3d9c0a-ld.mp4?Expires=1547183141&OSSAccessKeyId=LTAIx2xjxmIyFov4&Signature=sgkGoL4ucmpCfiTF5KnED77Rhhg%3D

https://outin-7dd6c2dd04bc11e9827300163e1c91c8.oss-cn-shanghai.aliyuncs.com/0dcd6977f51f4477a07c683692067225/f9437e7232814958acce0f3bca534ad5-4e00ff69f2c7fca7952546e6bc23d125-ld.mp4?Expires=1547183483&OSSAccessKeyId=LTAIx2xjxmIyFov4&Signature=SsO2OQUb7aIqsZojmLa5%2F7fBdp0%3D

同样的视频每次生成的地址中 Signature 是一直变化的

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao ...额,确实按这样是好了的正则也就是这样,我看以前提交记录文件这块好像也没变过=。=,我的过错。
具体上一次为什么会错我也忘了额(上面我发的图也确实是localStorage里面存储的)..很奇怪,哈哈^_^

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

@nszbf 引用线上的 https://player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js 这个地址的话, 这个地址导报后的js还没更新, 是会失效的。这个在线的js会和播放器的sdk一起更新的。

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao 嗯 好的Thanks♪(・ω・)ノ

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao 大哥 你只改了getItem 没有改 setItem 额...导致一直使用source存的 但是去却是用的vid,官网用source播放刚好避过了这一点=。=

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

image
image
image

还有个奇怪的问题,我不知道为什么存在localstorage里面的还是原本的source,但是正则完确实是去掉了?后的值

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao aliplayercomponents.min.js

image

image

源码里面没有改..

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

setMemory 里面确实是忘了调换 vid 和 source 的 顺序了, 一开始没有考虑到参数, source.replace(/?.*$/, '') 但是这个正则我暂时还没测试到去不掉参数的情况, 你这个打包出来的代码是引用官网在线的?这个打包的更新不及时, 建议直接使用源码, github 仓库里的代码。 @nszbf

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao 嗯 是官网在线的那个地址,你是说用npm方式吗,我没找到咱这个包的地址是多少额..

from aliyunplayer_web.

alyzhao avatar alyzhao commented on August 17, 2024

现在已经在着手弄一个专门的组件仓库, 目前这些组件还没有发布npm仓库只是把源码放在这儿, https://github.com/aliyunvideo/AliyunPlayer_Web/tree/master/customComponents/src/components/MemoryPlayComponent 这个目录下的文件你可以复制到项目中, 引用 import memoryComponent from 'MemoryPlayComponent/index.js' 就能在播放器中使用这个组件了。

from aliyunplayer_web.

nszbf avatar nszbf commented on August 17, 2024

@alyzhao 嗯 好的Thanks♪(・ω・)ノ

from aliyunplayer_web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.