Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
97ee3af4
Unverified
Commit
97ee3af4
authored
Oct 23, 2023
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add basic media player block
parent
1f589adc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
.npmrc
blocks/.npmrc
+4
-0
component.js
blocks/block-media-player/component.js
+73
-0
No files found.
blocks/.npmrc
0 → 100644
View file @
97ee3af4
audit = false
fund = false
save-exact = true
save-prefix = ""
blocks/block-media-player/component.js
0 → 100644
View file @
97ee3af4
import
{
LitElement
,
html
,
css
}
from
'lit'
/**
* Block Media Player
*/
export
class
BlockMediaPlayerElement
extends
LitElement
{
static
get
styles
()
{
return
css
`
:host {
display: block;
}
.container {
overflow: hidden;
border-radius: 5px;
position: relative;
}
`
}
static
get
properties
()
{
return
{
/**
* Source URL
* @type {string}
*/
src
:
{
type
:
String
},
// Internal Properties
// _loading: { state: true }
}
}
constructor
()
{
super
()
}
async
connectedCallback
()
{
super
.
connectedCallback
()
}
// get _video() {
// return this.renderRoot?.querySelector('.video-display') ?? null
// }
// _playPause () {
// if (this._video.paused) {
// this._video.play()
// } else {
// this._video.pause()
// }
// }
// _fullScreen () {
// if (this._video.requestFullscreen) {
// this._video.requestFullscreen()
// } else if (this._video.webkitRequestFullscreen) {
// this._video.webkitRequestFullscreen()
// }
// }
render
()
{
return
html
`
<div class="container">
<video class="video-display" controls>
<source src="
${
this
.
src
}
" type="video/mp4">
</video>
</div>
`
}
}
window
.
customElements
.
define
(
'block-media-player'
,
BlockMediaPlayerElement
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment