{"repo":"zhihu/griffith","free":true,"listed":false,"github":"https://github.com/zhihu/griffith","clone":"git clone https://github.com/zhihu/griffith.git","description":"A React-based web video player","language":"TypeScript","stars":2507,"topics":["zhihu","mp4","fmp4","hls","react","video","mp4box","html5-video","html5-video-player","zhihu-video-player"],"license":"MIT","category":"media-processing","readme_excerpt":"A React-based Web video player English 简体中文 日本語 Introduction - Streaming: Griffith makes streaming easy. Whether your video format is mp4 or hls, Griffith can use Media Source Extension (MSE) for segment loading. - Extensibility: Griffith makes it simple to support video features in React apps. It also supports the UMD (Universal Module Definition) patterns for direct use in the browser if your application is not based on React. - Reliability: Griffith has been widely used in the web and mobile web of Zhihu. Usage React application Detailed usage Note: Griffith is not supporting SSR application non-React application Standalone mode detailed usage Project Structure Griffith is a Monorepo and uses Yarn workspace and Lerna. Core - packages/griffith : The core library Utilities - packages/griffith-message : Helpers for cross-window message - packages/griffith-utils : Utilities Plugins - packages/griffith-mp4 : MP4 plugin powered by MediaSource API - packages/griffith-hls : HLS plugin powered by hls.js Others - example : example and demos - packages/griffith-standalone : A UMD build that can be used without React or Webpack Custom Build Build tools like webpack include griffith-mp4 and griffith-hls by default. You can make your bundle smaller by injecting aliases at build-time. If you use webpack, do so with resolve.alias: Note that without griffith-mp4 / griffith-hls Griffith can no longer play MP4 / HLS media unless the browser supports it natively. Contributing Read below to le","default_branch":null,"files":null,"tree":[],"storefront":"/r/zhihu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zhihu/griffith/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}