'use strict'
!(function(require, directRequire) {
  const a = require('./0634ee2ebd3e560d9d4804ecc960160f.js')
  module.exports = {
    insertVideoPlayer: async function(b, c) {
      const d = c.args || {}
      return d.position &&
        d.position.hasOwnProperty('left') &&
        d.position.hasOwnProperty('top') &&
        d.position.hasOwnProperty('width') &&
        d.position.hasOwnProperty('height')
        ? void b({
            type: a.SIMULATOR_INSERT_NATIVEVIEW,
            id: d.videoPlayerId,
            parentId: d.parentId || '0',
            name: 'video',
            api: c.api,
            callbackID: c.callbackID,
            args: d,
            position: d.position,
            data: {
              src: d.filePath,
              initialTime: d.initialTime,
              data: d.data,
              poster: d.poster,
              hidden: d.hide,
              autoplay: d.autoplay,
              disableScroll: d.disableScroll,
              controls: d.showBasicControls,
              danmuBtn: d.showDanmuBtn,
              enableDanmu: d.enableDanmu,
              danmuList: d.danmuList,
              direction: d.direction,
              needEvent: d.needEvent,
              objectFit: d.objectFit,
              duration: d.duration,
              live: d.live,
              muted: d.muted,
              loop: d.loop,
              pageGesture: d.pageGesture
            }
          })
        : { errMsg: `${c.api}:fail param position error` }
    },
    updateVideoPlayer: async function(b, c, d) {
      const e = c.args || {},
        f = d(),
        g = f.simulator.coverViewTree
      return g[e.videoPlayerId]
        ? !e.position ||
          (e.position.hasOwnProperty('left') &&
            e.position.hasOwnProperty('top') &&
            e.position.hasOwnProperty('width') &&
            e.position.hasOwnProperty('height'))
          ? (b({
              type: a.SIMULATOR_UPDATE_NATIVEVIEW,
              id: e.videoPlayerId,
              name: 'video',
              api: c.api,
              callbackID: c.callbackID,
              position: e.position,
              data: {
                src: e.filePath,
                initialTime: e.initialTime,
                data: e.data,
                poster: e.poster,
                hidden: e.hide,
                autoplay: e.autoplay,
                disableScroll: e.disableScroll,
                controls: e.showBasicControls,
                danmuBtn: e.showDanmuBtn,
                enableDanmu: e.enableDanmu,
                danmuList: e.danmuList,
                direction: e.direction,
                needEvent: e.needEvent,
                objectFit: e.objectFit,
                duration: e.duration,
                live: e.live,
                muted: e.muted,
                loop: e.loop,
                pageGesture: e.pageGesture
              }
            }),
            { errMsg: `${c.api}:ok` })
          : { errMsg: `${c.api}:fail param position error` }
        : { errMsg: `${c.api}:fail ${e.videoPlayerId} not found` }
    },
    removeVideoPlayer: async function(b, c, d) {
      const e = c.args || {},
        f = d(),
        g = f.simulator.coverViewTree
      return g[e.videoPlayerId]
        ? (b({
            type: a.SIMULATOR_REMOVE_NATIVEVIEW,
            id: e.videoPlayerId,
            name: 'video',
            api: c.api,
            callbackID: c.callbackID
          }),
          { errMsg: `${c.api}:ok` })
        : { errMsg: `${c.api}:fail ${e.videoPlayerId} not found` }
    },
    operateVideoPlayer: async function(b, c, d) {
      const e = c.args || {},
        f = d(),
        g = f.simulator.coverViewTree
      return g[e.videoPlayerId]
        ? (b({
            type: a.SIMULATOR_OPERATE_NATIVEVIEW,
            id: e.videoPlayerId,
            name: 'video',
            api: c.api,
            callbackID: c.callbackID,
            data: { method: e.type, data: e.data }
          }),
          { errMsg: `${c.api}:ok` })
        : { errMsg: `${c.api}:fail ${e.videoPlayerId} not found` }
    }
  }
})(require('lazyload'), require)
