Closed coltonoscopy closed 4 years ago
@coltonoscopy just want to make sure this one's been well-tested before I merge?
@coltonoscopy @dlloyd09 fwiw, json50
does now add dimensions and duration to video sources. That should be the case for all videos in games, mobile, and web.
cc @dcoffey3296
@dlloyd09 yep, but feel free to clone and bang on it (via npm install
and npm run dev
) to see if you caught anything I missed!
@kzidane getting the app to do the resizing based on the JSON would take quite a bit more work (most of the components are asynchronously created and everything is architected very one-way, in a functional style), so this is more of an immediate fix; been talking with @dmalan about potentially adding new features to the player long-term, at which point we can revisit JSON being incorporated and doing asynchronous construction of the components whereby they can programmatically calculate the aspect ratio of the PiP based on raster size.
@kzidane mind testing and merging when ready? @dlloyd09
Found a few issues some (or all) of them might be related? https://github.com/cs50/video50/issues?q=is%3Aissue+is%3Aopen+label%3Abug
Temporary solution to allow support for any videos in /mobile, /games, and /web on CDN; avoids parsing JSON for anything by simply string-searching the path. Performs conditional CSS via JavaScript and adds a parameter to the
VideoMain
andVideoAlt
components so they can read the path and do this.