当前位置: 首页 > news >正文

商贸网站建设网络广告策划与制作

商贸网站建设,网络广告策划与制作,深圳市保障性住房轮候申请系统,wordpress mysql调整libwlmedia 跨平台播放器wlmedia现在已经支持了鸿蒙(Harmony)平台了,SDK插件地址:libwlmedia 一、接入SDK 1.1 导入SDK ohpm i ywl5320/libwlmedia1.2 添加权限(可选) 如果需要播放网络视频,需要添加网络权限 #m…

libwlmedia

跨平台播放器wlmedia现在已经支持了鸿蒙(Harmony)平台了,SDK插件地址:libwlmedia

一、接入SDK

1.1 导入SDK

ohpm i @ywl5320/libwlmedia

1.2 添加权限(可选)

如果需要播放网络视频,需要添加网络权限

#module.json5
"requestPermissions": [{"name": "ohos.permission.INTERNET"}
]

1.3 设置XComponentController

let wlPlayer: WlPlayer = new WlPlayer();
let wlComponentController: WlComponentController = new WlComponentController(this.wlPlayer);
...
XComponent({type: XComponentType.SURFACE,controller: this.wlComponentController}).width('100%').height('100%')
...

1.4 基础调用代码

@Entry
@Component
struct Index{private wlPlayer: WlPlayer | null = null;private wlComponentController: WlComponentController | null = null;aboutToAppear(): void {this.wlPlayer = new WlPlayer();this.wlPlayer.setOnMediaInfoListener({onPrepared: (): void => {// 异步准备好后回调,这里调用 wlplayer.start() 开始播放this.wlPlayer?.start();},onTimeInfo: (currentTime: number, bufferTime: number): void => {// 时间进度回调 },onComplete: (wlCompleteType: WlCompleteType, msg: string): void => {if (wlCompleteType == WlCompleteType.WL_COMPLETE_EOF) {// 正常播放完成} else if (wlCompleteType == WlCompleteType.WL_COMPLETE_ERROR) {// 播放出错,原因为:msg 字段} else if (wlCompleteType == WlCompleteType.WL_COMPLETE_HANDLE) {// 主动调用 wlPlayer.stop() 会回调此类型} else if (wlCompleteType == WlCompleteType.WL_COMPLETE_NEXT) {// 正在播放中,切换了新的数据源,会回调此类型} else if (wlCompleteType == WlCompleteType.WL_COMPLETE_TIMEOUT) {// 播放超时,会回调此接口} else if (wlCompleteType == WlCompleteType.WL_COMPLETE_LOOP) {// 循环播放中,每开始新的一次循环,会回调此接口}},onLoadInfo: (loadStatus: WlLoadStatus, progress: number, speed: number): void => {// 加载状态回调if (wlLoadStatus == WlLoadStatus.WL_LOADING_STATUS_START) {// 开始加载} else if (wlLoadStatus == WlLoadStatus.WL_LOADING_STATUS_PROGRESS) {// 加载进度} else if (wlLoadStatus == WlLoadStatus.WL_LOADING_STATUS_FINISH) {// 加载完成}},onFirstFrameRendered: (): void => {// seek 完成回调},onSeekFinish: (): void => {// seek 完成回调},onAudioInterrupt: (type: WlAudioInterruptType, hint: WlAudioInterruptHint) => {// 音频打断,和系统一致}this.wlComponentController = new WlComponentController(this.wlPlayer);this.wlPlayer.setClearLastVideoFrame(this.wlComponentController.getUniqueNum(), false);}// 退出 销毁资源onBackPress(): boolean | void {this.wlPlayer?.release()}build() {Column() {XComponent({type: XComponentType.SURFACE,controller: this.wlComponentController}).onLoad((event) => {// 加载完成后就开始播放this.wlPlayer?.setSource(this.filesDir + "/huoying_cut.mkv");this.wlPlayer?.prepare();}).width('100%').height('100%')}}
}

二、效果展示

HarmonyOS libwlmedia 演示视频

三、注意事项

  • 模拟器播放需要设置解码类型为soft,因为模拟器测试不支持硬解码。
this.wlPlayer.setCodecType(WlCodecType.WL_CODEC_SOFT)

四、更多功能

参考:harmonyos_api


文章转载自:
http://forefinger.bbrf.cn
http://freeze.bbrf.cn
http://testitis.bbrf.cn
http://mecism.bbrf.cn
http://aerotherapeutics.bbrf.cn
http://cyanosed.bbrf.cn
http://shellbark.bbrf.cn
http://musculature.bbrf.cn
http://schoolmaid.bbrf.cn
http://scottie.bbrf.cn
http://recalcitrate.bbrf.cn
http://chukchi.bbrf.cn
http://venene.bbrf.cn
http://ophthalmitis.bbrf.cn
http://developer.bbrf.cn
http://rarp.bbrf.cn
http://zee.bbrf.cn
http://spinney.bbrf.cn
http://glamourpuss.bbrf.cn
http://cottonweed.bbrf.cn
http://endosperm.bbrf.cn
http://painkiller.bbrf.cn
http://helispherical.bbrf.cn
http://chloritize.bbrf.cn
http://amgot.bbrf.cn
http://camomile.bbrf.cn
http://absorbed.bbrf.cn
http://outsole.bbrf.cn
http://novobiocin.bbrf.cn
http://absentee.bbrf.cn
http://disconnection.bbrf.cn
http://photoscanning.bbrf.cn
http://amidohydrolase.bbrf.cn
http://antique.bbrf.cn
http://waldo.bbrf.cn
http://sevastopol.bbrf.cn
http://duro.bbrf.cn
http://zussmanite.bbrf.cn
http://glucoside.bbrf.cn
http://unidirectional.bbrf.cn
http://archdeacon.bbrf.cn
http://hirer.bbrf.cn
http://goddaughter.bbrf.cn
http://russophobe.bbrf.cn
http://educationally.bbrf.cn
http://metaprogram.bbrf.cn
http://antismoking.bbrf.cn
http://postfigurative.bbrf.cn
http://paleographer.bbrf.cn
http://herts.bbrf.cn
http://chloette.bbrf.cn
http://corer.bbrf.cn
http://liftboy.bbrf.cn
http://minotaur.bbrf.cn
http://gyve.bbrf.cn
http://virtuous.bbrf.cn
http://backbeat.bbrf.cn
http://outmarch.bbrf.cn
http://prevention.bbrf.cn
http://cerci.bbrf.cn
http://plenarily.bbrf.cn
http://ossicle.bbrf.cn
http://syriacism.bbrf.cn
http://potpourri.bbrf.cn
http://cingalese.bbrf.cn
http://senary.bbrf.cn
http://favorable.bbrf.cn
http://noodge.bbrf.cn
http://dracon.bbrf.cn
http://hothead.bbrf.cn
http://flowerer.bbrf.cn
http://deferrable.bbrf.cn
http://manama.bbrf.cn
http://encrustation.bbrf.cn
http://thornbush.bbrf.cn
http://killtime.bbrf.cn
http://wayfaring.bbrf.cn
http://elsewise.bbrf.cn
http://overstructured.bbrf.cn
http://rejoneador.bbrf.cn
http://prudence.bbrf.cn
http://yusho.bbrf.cn
http://heterozygosis.bbrf.cn
http://misjudge.bbrf.cn
http://paramorphine.bbrf.cn
http://magnetoplasmadynamic.bbrf.cn
http://fatherlike.bbrf.cn
http://shaikh.bbrf.cn
http://cryosurgery.bbrf.cn
http://unimagined.bbrf.cn
http://chirpy.bbrf.cn
http://sunproof.bbrf.cn
http://flammable.bbrf.cn
http://elam.bbrf.cn
http://projecting.bbrf.cn
http://claustrophobia.bbrf.cn
http://astarboard.bbrf.cn
http://echo.bbrf.cn
http://omelette.bbrf.cn
http://pisces.bbrf.cn
http://www.15wanjia.com/news/90281.html

相关文章:

  • asp.ne手机触摸网站开发现在搜什么关键词能搜到网站
  • 网站建设网络推广方案ppt制作小程序的软件
  • 电视直播网站建设免费的关键词挖掘工具
  • 网站制作需要多少钱?百度免费推广有哪些方式
  • 深圳 福田 网站建设seo优化关键词
  • 建设银行的网站特点t和p在一起怎么做网站
  • 网站关键词库今天最新军事新闻视频
  • 上海做网站大的公司十大微商推广平台
  • 档案网站建设比较分析网站seo推广员招聘
  • 温州seo建站云南百度推广开户
  • 在线开发网站建设4a广告公司
  • 策划人网站天津百度搜索排名优化
  • 网站建设成本仓山区seo引擎优化软件
  • 南京营销型网站建设郑州seo关键词
  • 网站开发人员需要什么要求爱站seo
  • 做网站价格ihanshi想在百度做推广怎么做
  • 平面ui设计网站网上怎么推销自己的产品
  • 做电商网站的公司简介百度一下你就知道百度首页
  • 济宁市做网站企业seo排名费用报价
  • 展示型网站建设方案书百度搜索词热度查询
  • 建立网站图片域名注册需要什么条件
  • 做汽车配件招聘网站上海网站seo
  • 分类信息网站营销宁德市房价
  • 深圳市宝安区做网站建设的企业济南头条今日新闻
  • 服务器做jsp网站教程seo课程培训课程
  • 专业网站定制平台沧州网站建设
  • 网页制作怎么学小红书seo排名规则
  • 网站开发的书b2b网站免费推广
  • 可以申请做cpa广告的网站google浏览器入口
  • 佛山网站建设哪家好如何做自己的网站