-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Luna Lrc Player | ||
|
||
Play lyrics in LRC format. | ||
|
||
## Demo | ||
|
||
https://luna.liriliri.io/?path=/story/lrc-player | ||
|
||
## Install | ||
|
||
Add the following script and style to your page. | ||
|
||
```html | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-lrc-player/luna-lrc-player.css" /> | ||
<script src="//cdn.jsdelivr.net/npm/luna-lrc-player/luna-lrc-player.js"></script> | ||
``` | ||
|
||
You can also get it on npm. | ||
|
||
```bash | ||
npm install luna-lrc-player --save | ||
``` | ||
|
||
```javascript | ||
import 'luna-lrc-player/luna-lrc-player.css' | ||
import LunaLrcPlayer from 'luna-lrc-player' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Component from '../share/Component' | ||
import { exportCjs } from '../share/util' | ||
|
||
/** | ||
* Play lyrics in LRC format. | ||
*/ | ||
export default class LrcPlayer extends Component { | ||
constructor(container: HTMLElement) { | ||
super(container, { compName: 'lrc-player' }) | ||
} | ||
} | ||
|
||
if (typeof module !== 'undefined') { | ||
exportCjs(module, LrcPlayer) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "lrc-player", | ||
"version": "0.1.0", | ||
"description": "Play lyrics in LRC format" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'luna-lrc-player.css' | ||
import LrcPlayer from 'luna-lrc-player.js' | ||
import readme from './README.md' | ||
import story from '../share/story' | ||
|
||
const def = story( | ||
'lrc-player', | ||
(container) => { | ||
const lrcPlayer = new LrcPlayer(container) | ||
|
||
return lrcPlayer | ||
}, | ||
{ | ||
readme, | ||
story: __STORY__, | ||
} | ||
) | ||
|
||
export default def | ||
export const { lrcPlayer } = def |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters