Skip to content

Why import ui from '@oplayer/ui' could not Found in Next.js App #140

Answered by shiyiya
heirro asked this question in Q&A
Discussion options

You must be logged in to vote
  1. UI TypeError fixed in @oplayer/ui@1.3.4-beta.1
  2. React TypeError fixed in @oplayer/react@1.2.11-beta.0
  3. Disable react strict mode
pnpm i @oplayer/ui@1.3.4-beta.1 @oplayer/react@1.2.11-beta.0
'use client'

import ReactOPlayer from '@oplayer/react'
import ui from '@oplayer/ui'
import Player, { Source } from '@oplayer/core'

import hls from '@oplayer/hls'
import { useEffect, useState, useRef } from 'react'

const plugins = [
  ui({
    theme: {
      controller: {
        slideToSeek: 'always'
      }
    },
    pictureInPicture: false,
    screenshot: false,
    keyboard: { global: true }
  }),
  hls()
]

export default function Home() {
  const [source, setSource] = useState<Promise<Source>>(

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@heirro
Comment options

Comment options

You must be logged in to vote
1 reply
@heirro
Comment options

Comment options

You must be logged in to vote
1 reply
@heirro
Comment options

Comment options

You must be logged in to vote
7 replies
@heirro
Comment options

@shiyiya
Comment options

@heirro
Comment options

@shiyiya
Comment options

@heirro
Comment options

Answer selected by shiyiya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants