bugfix
This commit is contained in:
parent
b115f2de65
commit
46a930254a
@ -636,6 +636,18 @@ bricks.App = class extends bricks.Layout {
|
||||
console.error('获取摄像头数量出错:', error);
|
||||
}
|
||||
}
|
||||
async start_media(opts){
|
||||
/* opts:
|
||||
type:device or 'widget'
|
||||
widgetid:
|
||||
widget:
|
||||
audio:true,
|
||||
video:true
|
||||
vpos:
|
||||
*/
|
||||
}
|
||||
async stop_media(media_stream){
|
||||
}
|
||||
async start_camera(vpos) {
|
||||
if (typeof(vpos) == 'undefined') vpos = 0;
|
||||
if (this.video_devices === null){
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.js \
|
||||
i18n.js widget.js layout.js bricks.js image.js html.js splitter.js \
|
||||
jsoncall.js myoperator.js scroll.js menu.js popup.js camera.js \
|
||||
jsoncall.js myoperator.js scroll.js menu.js popup.js recorder.js \
|
||||
modal.js running.js llmout.js \
|
||||
markdown_viewer.js audio.js toolbar.js tab.js \
|
||||
input.js registerfunction.js button.js accordion.js dataviewer.js \
|
||||
|
||||
@ -644,7 +644,7 @@ bricks.UiImage =class extends bricks.UiFile {
|
||||
}
|
||||
take_photo(event){
|
||||
event.stopPropagation();
|
||||
var camera = new bricks.Camera({
|
||||
var camera = new bricks.SysCamera({
|
||||
"archor":"cc",
|
||||
"auto_open":true,
|
||||
"height":"90%",
|
||||
|
||||
@ -1,6 +1,18 @@
|
||||
var bricks = window.bricks || {};
|
||||
bricks.bug = false;
|
||||
|
||||
bricks.timeDiff = function(startTime) {
|
||||
const now = Date.now();
|
||||
const diff = now - (startTime instanceof Date ? startTime.getTime() : startTime); // 毫秒差值
|
||||
|
||||
const hours = String(Math.floor(diff / (1000 * 60 * 60))).padStart(2, "0");
|
||||
const minutes = String(Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, "0");
|
||||
const seconds = String(Math.floor((diff % (1000 * 60)) / 1000)).padStart(2, "0");
|
||||
const milliseconds = String(diff % 1000).padStart(3, "0");
|
||||
|
||||
return `${hours}:${minutes}:${seconds}.${milliseconds}`;
|
||||
}
|
||||
|
||||
/*
|
||||
We use ResizeObserver to implements dom object resize event
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user