- Inject PlayerBridge AVPlayer into BricksStore for VideoPlayer widget - Load miniplayer.json from SPM bundle resources - Fix infinite render loop: pass JSON string instead of schema object - Fix async closure mismatch in setupBridgeEvents - Enhanced JSON: URL input, load/play/pause buttons, title bar - Remove duplicate Resources/miniplayer.json (keep SPM-compliant path)
165 lines
3.8 KiB
JSON
165 lines
3.8 KiB
JSON
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"bgcolor": "#000000"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VideoPlayer",
|
|
"id": "videoPlayer",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "85%"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "15%",
|
|
"bgcolor": "#1a1a1a",
|
|
"spacing": 6,
|
|
"padding": "8px 12px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "openBtn",
|
|
"options": {
|
|
"label": "Open",
|
|
"icon": "folder",
|
|
"cwidth": 8,
|
|
"cheight": 4,
|
|
"bgcolor": "#555555",
|
|
"color": "#ffffff"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "event",
|
|
"target": "videoPlayer.openFile"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "prevBtn",
|
|
"options": {
|
|
"label": "Prev",
|
|
"icon": "backward.fill",
|
|
"cwidth": 8,
|
|
"cheight": 4,
|
|
"bgcolor": "#333333",
|
|
"color": "#ffffff"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "event",
|
|
"target": "videoPlayer.prev"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "toggleBtn",
|
|
"options": {
|
|
"label": "Play/Pause",
|
|
"icon": "playpause.fill",
|
|
"cwidth": 12,
|
|
"cheight": 4,
|
|
"bgcolor": "#007aff",
|
|
"color": "#ffffff"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "event",
|
|
"target": "videoPlayer.toggle"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "nextBtn",
|
|
"options": {
|
|
"label": "Next",
|
|
"icon": "forward.fill",
|
|
"cwidth": 8,
|
|
"cheight": 4,
|
|
"bgcolor": "#333333",
|
|
"color": "#ffffff"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "event",
|
|
"target": "videoPlayer.next"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Filler"
|
|
},
|
|
{
|
|
"widgettype": "Input",
|
|
"id": "videoUrlInput",
|
|
"options": {
|
|
"name": "url",
|
|
"placeholder": "Enter video URL...",
|
|
"cwidth": 30,
|
|
"cheight": 4
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "loadBtn",
|
|
"options": {
|
|
"label": "Load",
|
|
"icon": "arrow.down.circle.fill",
|
|
"cwidth": 8,
|
|
"cheight": 4,
|
|
"bgcolor": "#5856d6",
|
|
"color": "#ffffff"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "method",
|
|
"target": "videoPlayer",
|
|
"method": "setURL"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "fullscreenBtn",
|
|
"options": {
|
|
"label": "Fullscreen",
|
|
"icon": "arrow.up.left.and.arrow.down.right",
|
|
"cwidth": 10,
|
|
"cheight": 4,
|
|
"bgcolor": "#ff9500",
|
|
"color": "#ffffff"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "event",
|
|
"target": "videoPlayer.fullscreen"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|