picture-in-picture.js 576 B

1234567891011121314151617181920212223242526272829303132
  1. Page({
  2. data: {
  3. theme: 'light',
  4. },
  5. onLoad() {
  6. this.setData({
  7. theme: wx.getSystemInfoSync().theme || 'light'
  8. })
  9. if (wx.onThemeChange) {
  10. wx.onThemeChange(({theme}) => {
  11. this.setData({theme})
  12. })
  13. }
  14. },
  15. onReady() {
  16. },
  17. onShareAppMessage() {
  18. return {
  19. title: '小窗模式',
  20. path: 'packageComponent/pages/media/picture-in-picture/picture-in-picture'
  21. }
  22. },
  23. // onShareAppMessage() {
  24. // return {
  25. // title: 'video',
  26. // path: 'packageComponent/pages/media/video/video'
  27. // }
  28. // },
  29. })