|
@@ -18,6 +18,7 @@ type Propr = {
|
|
function PanoVideo({ lodingOk }: Propr) {
|
|
function PanoVideo({ lodingOk }: Propr) {
|
|
// 热点名字-打开热点
|
|
// 热点名字-打开热点
|
|
const [acName, setAcName] = useState('')
|
|
const [acName, setAcName] = useState('')
|
|
|
|
+ const isMobile = /Mobi|Android|iPhone/i.test(navigator.userAgent)
|
|
|
|
|
|
const [activeIdx, setActiveIdx] = useState(-1)
|
|
const [activeIdx, setActiveIdx] = useState(-1)
|
|
const middlewareIns = useRef<KrpanoMiddlewareMethods>(null)
|
|
const middlewareIns = useRef<KrpanoMiddlewareMethods>(null)
|
|
@@ -63,12 +64,17 @@ function PanoVideo({ lodingOk }: Propr) {
|
|
videoplayerUrl='./plugins/videoplayer.js'
|
|
videoplayerUrl='./plugins/videoplayer.js'
|
|
sourceList={[
|
|
sourceList={[
|
|
{
|
|
{
|
|
- res: '2000x1000',
|
|
|
|
|
|
+ res: '8000x4000',
|
|
url: otherUrl + 'pano/1.mp4',
|
|
url: otherUrl + 'pano/1.mp4',
|
|
- poster: otherUrl + 'pano/pano2.jpg'
|
|
|
|
|
|
+ poster: otherUrl + 'pano/pano1.jpg'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ res: '4000x2000',
|
|
|
|
+ url: otherUrl + 'pano/1-4k.mp4',
|
|
|
|
+ poster: otherUrl + 'pano/pano1.jpg'
|
|
}
|
|
}
|
|
]}
|
|
]}
|
|
- playRes='2000x1000'
|
|
|
|
|
|
+ playRes={isMobile ? '4000x2000' : '8000x4000'}
|
|
onVisibility={() => {
|
|
onVisibility={() => {
|
|
if (document.visibilityState === 'visible') {
|
|
if (document.visibilityState === 'visible') {
|
|
videoSceneModel.play()
|
|
videoSceneModel.play()
|