@plusscommunities/pluss-core-app 6.1.7 → 6.1.8-auth.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/FollowerActions.js +4 -4
- package/dist/module/actions/FollowerActions.js.map +1 -1
- package/dist/module/actions/MediaActions.js +1 -1
- package/dist/module/actions/MediaActions.js.map +1 -1
- package/dist/module/actions/ResidentActions.js +1 -1
- package/dist/module/actions/ResidentActions.js.map +1 -1
- package/dist/module/actions/UserActions.js +1 -1
- package/dist/module/actions/UserActions.js.map +1 -1
- package/dist/module/actions/UserSettingsActions.js +1 -1
- package/dist/module/actions/UserSettingsActions.js.map +1 -1
- package/dist/module/actions/index.js +5 -5
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +16 -16
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/analyticsActions.js +5 -5
- package/dist/module/apis/analyticsActions.js.map +1 -1
- package/dist/module/apis/contactActions.js +6 -6
- package/dist/module/apis/contactActions.js.map +1 -1
- package/dist/module/apis/eventActions.js +28 -28
- package/dist/module/apis/eventActions.js.map +1 -1
- package/dist/module/apis/fileActions.js +21 -28
- package/dist/module/apis/fileActions.js.map +1 -1
- package/dist/module/apis/followerActions.js +8 -8
- package/dist/module/apis/followerActions.js.map +1 -1
- package/dist/module/apis/index.js +12 -12
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/notificationActions.js +17 -17
- package/dist/module/apis/notificationActions.js.map +1 -1
- package/dist/module/apis/profileActions.js +4 -4
- package/dist/module/apis/profileActions.js.map +1 -1
- package/dist/module/apis/reactionActions.js +15 -15
- package/dist/module/apis/reactionActions.js.map +1 -1
- package/dist/module/apis/settingActions.js +6 -6
- package/dist/module/apis/settingActions.js.map +1 -1
- package/dist/module/apis/stringActions.js +8 -8
- package/dist/module/apis/stringActions.js.map +1 -1
- package/dist/module/apis/typeActions.js +4 -4
- package/dist/module/apis/typeActions.js.map +1 -1
- package/dist/module/apis/userActions.js +8 -8
- package/dist/module/apis/userActions.js.map +1 -1
- package/dist/module/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-light-300.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
- package/dist/module/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
- package/dist/module/colours.js +26 -29
- package/dist/module/colours.js.map +1 -1
- package/dist/module/components/AddButton.js +8 -8
- package/dist/module/components/AddButton.js.map +1 -1
- package/dist/module/components/AddToCalendarButton.js +30 -29
- package/dist/module/components/AddToCalendarButton.js.map +1 -1
- package/dist/module/components/Attachment.js +10 -9
- package/dist/module/components/Attachment.js.map +1 -1
- package/dist/module/components/AudienceSelectorLauncher.js +11 -11
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -1
- package/dist/module/components/AudienceSelectorPage.js +45 -44
- package/dist/module/components/AudienceSelectorPage.js.map +1 -1
- package/dist/module/components/AutoOffsetImage.js +13 -13
- package/dist/module/components/AutoOffsetImage.js.map +1 -1
- package/dist/module/components/BackButton.js +10 -10
- package/dist/module/components/BackButton.js.map +1 -1
- package/dist/module/components/CalendarPopup.js +21 -21
- package/dist/module/components/CalendarPopup.js.map +1 -1
- package/dist/module/components/CategoryTabs.js +30 -29
- package/dist/module/components/CategoryTabs.js.map +1 -1
- package/dist/module/components/CommentReply.js +36 -34
- package/dist/module/components/CommentReply.js.map +1 -1
- package/dist/module/components/CommentSection.js +74 -74
- package/dist/module/components/CommentSection.js.map +1 -1
- package/dist/module/components/ConfirmPopup.js +21 -20
- package/dist/module/components/ConfirmPopup.js.map +1 -1
- package/dist/module/components/ConfirmationPopup.js +11 -11
- package/dist/module/components/ConfirmationPopup.js.map +1 -1
- package/dist/module/components/DocumentUploader.js +253 -0
- package/dist/module/components/DocumentUploader.js.map +1 -0
- package/dist/module/components/DropDownItem.js +14 -13
- package/dist/module/components/DropDownItem.js.map +1 -1
- package/dist/module/components/DropDownMenu.js +5 -5
- package/dist/module/components/DropDownMenu.js.map +1 -1
- package/dist/module/components/EmptyStateMain.js +10 -9
- package/dist/module/components/EmptyStateMain.js.map +1 -1
- package/dist/module/components/EmptyStateWidget.js +7 -6
- package/dist/module/components/EmptyStateWidget.js.map +1 -1
- package/dist/module/components/FontScaleButton.js +5 -4
- package/dist/module/components/FontScaleButton.js.map +1 -1
- package/dist/module/components/FontScalePopup.js +11 -10
- package/dist/module/components/FontScalePopup.js.map +1 -1
- package/dist/module/components/Forbidden.js +13 -13
- package/dist/module/components/Forbidden.js.map +1 -1
- package/dist/module/components/FormCard.js +4 -4
- package/dist/module/components/FormCard.js.map +1 -1
- package/dist/module/components/FormCardSection.js +20 -18
- package/dist/module/components/FormCardSection.js.map +1 -1
- package/dist/module/components/FormCardSectionOptionLauncher.js +13 -12
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -1
- package/dist/module/components/FormattedText.js +18 -16
- package/dist/module/components/FormattedText.js.map +1 -1
- package/dist/module/components/GenericInput.js +24 -21
- package/dist/module/components/GenericInput.js.map +1 -1
- package/dist/module/components/GenericInputSection.js +27 -26
- package/dist/module/components/GenericInputSection.js.map +1 -1
- package/dist/module/components/Header.js +70 -69
- package/dist/module/components/Header.js.map +1 -1
- package/dist/module/components/Icon.js +109 -0
- package/dist/module/components/Icon.js.map +1 -0
- package/dist/module/components/ImagePopup.js +237 -77
- package/dist/module/components/ImagePopup.js.map +1 -1
- package/dist/module/components/ImageUploadProgress.js +10 -9
- package/dist/module/components/ImageUploadProgress.js.map +1 -1
- package/dist/module/components/ImageUploader.js +22 -13
- package/dist/module/components/ImageUploader.js.map +1 -1
- package/dist/module/components/InlineButton.js +9 -8
- package/dist/module/components/InlineButton.js.map +1 -1
- package/dist/module/components/Input.js +28 -26
- package/dist/module/components/Input.js.map +1 -1
- package/dist/module/components/LoadingCircles.js +20 -20
- package/dist/module/components/LoadingCircles.js.map +1 -1
- package/dist/module/components/LoadingIndicator.js +11 -11
- package/dist/module/components/LoadingIndicator.js.map +1 -1
- package/dist/module/components/LoadingStateWidget.js +5 -5
- package/dist/module/components/LoadingStateWidget.js.map +1 -1
- package/dist/module/components/MediaPlayer.js +32 -32
- package/dist/module/components/MediaPlayer.js.map +1 -1
- package/dist/module/components/MiddlePopup.js +9 -9
- package/dist/module/components/MiddlePopup.js.map +1 -1
- package/dist/module/components/PDFPopup.js +36 -36
- package/dist/module/components/PDFPopup.js.map +1 -1
- package/dist/module/components/PlussChat.js +234 -146
- package/dist/module/components/PlussChat.js.map +1 -1
- package/dist/module/components/PlussChatMessage.js +75 -38
- package/dist/module/components/PlussChatMessage.js.map +1 -1
- package/dist/module/components/PlussChatTime.js +18 -17
- package/dist/module/components/PlussChatTime.js.map +1 -1
- package/dist/module/components/Popup.js +20 -19
- package/dist/module/components/Popup.js.map +1 -1
- package/dist/module/components/PopupMenu.js +15 -14
- package/dist/module/components/PopupMenu.js.map +1 -1
- package/dist/module/components/PositionedImage.js +20 -20
- package/dist/module/components/PositionedImage.js.map +1 -1
- package/dist/module/components/ProfilePic.js +10 -10
- package/dist/module/components/ProfilePic.js.map +1 -1
- package/dist/module/components/RadioButton.js +10 -9
- package/dist/module/components/RadioButton.js.map +1 -1
- package/dist/module/components/Reaction.js +18 -17
- package/dist/module/components/Reaction.js.map +1 -1
- package/dist/module/components/Reactions.js +7 -7
- package/dist/module/components/Reactions.js.map +1 -1
- package/dist/module/components/SharingTools.js +29 -28
- package/dist/module/components/SharingTools.js.map +1 -1
- package/dist/module/components/Spinner.js +5 -5
- package/dist/module/components/Spinner.js.map +1 -1
- package/dist/module/components/StickyFooter.js +6 -6
- package/dist/module/components/StickyFooter.js.map +1 -1
- package/dist/module/components/Text.js +57 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TickIcon.js +6 -6
- package/dist/module/components/TickIcon.js.map +1 -1
- package/dist/module/components/Toggle.js +10 -9
- package/dist/module/components/Toggle.js.map +1 -1
- package/dist/module/components/TouchableSearchBar.js +18 -17
- package/dist/module/components/TouchableSearchBar.js.map +1 -1
- package/dist/module/components/UserListPopup.js +20 -19
- package/dist/module/components/UserListPopup.js.map +1 -1
- package/dist/module/components/UserListing.js +41 -40
- package/dist/module/components/UserListing.js.map +1 -1
- package/dist/module/components/VideoPopup.js +20 -20
- package/dist/module/components/VideoPopup.js.map +1 -1
- package/dist/module/components/WarningPopup.js +21 -20
- package/dist/module/components/WarningPopup.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +13 -13
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -1
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +24 -23
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -1
- package/dist/module/components/index.js +59 -57
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +90 -58
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -1
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +64 -64
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -1
- package/dist/module/config.js +6 -1
- package/dist/module/config.js.map +1 -1
- package/dist/module/constants.js +3 -3
- package/dist/module/constants.js.map +1 -1
- package/dist/module/helper.js +83 -82
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +12 -12
- package/dist/module/index.js.map +1 -1
- package/dist/module/js/images/detectFaces.js +6 -6
- package/dist/module/js/images/detectFaces.js.map +1 -1
- package/dist/module/js/images/findLandmarkRange.js +8 -8
- package/dist/module/js/images/findLandmarkRange.js.map +1 -1
- package/dist/module/js/images/getScaledOffset.js.map +1 -1
- package/dist/module/js/site/getSiteLevelFromState.js +2 -2
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -1
- package/dist/module/js/site/isTVEnabled.js +2 -2
- package/dist/module/js/site/isTVEnabled.js.map +1 -1
- package/dist/module/session.js +2 -2
- package/dist/module/session.js.map +1 -1
- package/dist/module/styles.js +17 -17
- package/dist/module/styles.js.map +1 -1
- package/dist/module/withNavigationFocus.js +30 -0
- package/dist/module/withNavigationFocus.js.map +1 -0
- package/package.json +4 -1
- package/src/actions/FollowerActions.js +36 -32
- package/src/actions/MediaActions.js +25 -20
- package/src/actions/ResidentActions.js +26 -21
- package/src/actions/UserActions.js +22 -22
- package/src/actions/UserSettingsActions.js +11 -11
- package/src/actions/index.js +5 -5
- package/src/actions/types.js +16 -16
- package/src/apis/analyticsActions.js +17 -17
- package/src/apis/contactActions.js +20 -20
- package/src/apis/eventActions.js +153 -144
- package/src/apis/fileActions.js +19 -27
- package/src/apis/followerActions.js +29 -29
- package/src/apis/index.js +12 -12
- package/src/apis/notificationActions.js +44 -44
- package/src/apis/profileActions.js +8 -8
- package/src/apis/reactionActions.js +81 -73
- package/src/apis/settingActions.js +15 -15
- package/src/apis/stringActions.js +29 -25
- package/src/apis/typeActions.js +10 -10
- package/src/apis/userActions.js +93 -93
- package/src/assets/icons/fontawesome/fa-brands-400.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-light-300.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-regular-400.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-solid-900.ttf +0 -0
- package/src/assets/icons/fontawesome/fa-thin-100.ttf +0 -0
- package/src/assets/icons/fontawesome/fa7-glyphmap.json +4205 -0
- package/src/colours.js +116 -96
- package/src/components/AddButton.js +32 -27
- package/src/components/AddToCalendarButton.js +236 -202
- package/src/components/Attachment.js +59 -36
- package/src/components/AudienceSelectorLauncher.js +52 -48
- package/src/components/AudienceSelectorPage.js +353 -311
- package/src/components/AutoOffsetImage.js +237 -196
- package/src/components/BackButton.js +57 -41
- package/src/components/CalendarPopup.js +127 -97
- package/src/components/CategoryTabs.js +208 -163
- package/src/components/CommentReply.js +363 -309
- package/src/components/CommentSection.js +974 -782
- package/src/components/ConfirmPopup.js +141 -110
- package/src/components/ConfirmationPopup.js +80 -69
- package/src/components/DocumentUploader.js +255 -0
- package/src/components/DropDownItem.js +70 -60
- package/src/components/DropDownMenu.js +31 -27
- package/src/components/EmptyStateMain.js +51 -44
- package/src/components/EmptyStateWidget.js +47 -38
- package/src/components/FontScaleButton.js +29 -25
- package/src/components/FontScalePopup.js +67 -56
- package/src/components/Forbidden.js +48 -46
- package/src/components/FormCard.js +21 -17
- package/src/components/FormCardSection.js +284 -233
- package/src/components/FormCardSectionOptionLauncher.js +72 -46
- package/src/components/FormattedText.js +128 -111
- package/src/components/GenericInput.js +168 -136
- package/src/components/GenericInputSection.js +209 -161
- package/src/components/Header.js +620 -474
- package/src/components/Icon.js +119 -0
- package/src/components/ImagePopup.js +425 -206
- package/src/components/ImageUploadProgress.js +49 -41
- package/src/components/ImageUploader.js +23 -13
- package/src/components/InlineButton.js +79 -69
- package/src/components/Input.js +190 -156
- package/src/components/LoadingCircles.js +233 -233
- package/src/components/LoadingIndicator.js +87 -76
- package/src/components/LoadingStateWidget.js +47 -37
- package/src/components/MediaPlayer.js +416 -387
- package/src/components/MiddlePopup.js +50 -32
- package/src/components/PDFPopup.js +198 -159
- package/src/components/PlussChat.js +1271 -986
- package/src/components/PlussChatMessage.js +330 -262
- package/src/components/PlussChatTime.js +57 -53
- package/src/components/Popup.js +138 -116
- package/src/components/PopupMenu.js +140 -110
- package/src/components/PositionedImage.js +281 -237
- package/src/components/ProfilePic.js +122 -113
- package/src/components/RadioButton.js +76 -52
- package/src/components/Reaction.js +134 -96
- package/src/components/Reactions.js +65 -63
- package/src/components/SharingTools.js +136 -122
- package/src/components/Spinner.js +13 -13
- package/src/components/StickyFooter.js +36 -26
- package/src/components/Text.js +62 -0
- package/src/components/TickIcon.js +20 -20
- package/src/components/Toggle.js +74 -73
- package/src/components/TouchableSearchBar.js +68 -50
- package/src/components/UserListPopup.js +161 -124
- package/src/components/UserListing.js +273 -238
- package/src/components/VideoPopup.js +110 -96
- package/src/components/WarningPopup.js +92 -71
- package/src/components/expo-image-picker-multiple/ImageBrowser.js +288 -256
- package/src/components/expo-image-picker-multiple/ImageTile.js +108 -84
- package/src/components/index.js +59 -57
- package/src/components/react-native-expo-image-cropper/ExpoImageManipulator.js +442 -358
- package/src/components/react-native-expo-image-cropper/ImageCropOverlay.js +420 -324
- package/src/config.js +5 -0
- package/src/constants.js +8 -8
- package/src/helper.js +469 -438
- package/src/index.js +24 -12
- package/src/js/images/detectFaces.js +27 -20
- package/src/js/images/findLandmarkRange.js +97 -90
- package/src/js/images/getScaledOffset.js +80 -75
- package/src/js/site/getSiteLevelFromState.js +26 -26
- package/src/js/site/isTVEnabled.js +10 -10
- package/src/session.js +2 -2
- package/src/styles.js +61 -61
- package/src/withNavigationFocus.js +28 -0
- package/dist/module/components/TextStyle.js +0 -45
- package/dist/module/components/TextStyle.js.map +0 -1
- package/dist/module/fonts/index.js +0 -2
- package/dist/module/fonts/index.js.map +0 -1
- package/dist/module/fonts/pluss60-icons.js +0 -5
- package/dist/module/fonts/pluss60-icons.js.map +0 -1
- package/dist/module/fonts/pluss60-icons.json +0 -1097
- package/src/components/TextStyle.js +0 -48
- package/src/fonts/index.js +0 -1
- package/src/fonts/pluss60-icons.js +0 -6
- package/src/fonts/pluss60-icons.json +0 -1097
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","View","StyleSheet","Dimensions","YoutubePlayer","getYoutubeMeta","Vimeo","WebView","Video","Spinner","SCREEN_HEIGHT","get","height","SCREEN_WIDTH","width","EXPO_VIDEO_PROPS","rate","isMuted","volume","RETRY_RECOVER","RETRY_LOADING","MediaPlayer","constructor","props","_defineProperty","setupForPlaying","checkStreamLoaded","clearInterval","url","replace","split","undefined","ids","result","match","source","useVideoPlayer","isUrlLink","startsWith","isYoutube","includes","isVimeo","heightFactor","metadata","getYoutubeVideoId","setState","playbackLoaded","readyToRender","playbackId","wait","force","retryLoading","console","log","setTimeout","playbackBuffering","state","videoPlayer","loadAsync","uri","getStreamPlaybackUrl","overrideFileExtensionAndroid","deviceRotation","beta","gamma","absGamma","Math","abs","absBeta","isGammaNegative","sign","changeEvent","rotation","deviceOrientation","orientation","isLandscape","orientationQueue","push","length","slice","every","i","orientationChanged","setInterval","checkReloadStream","status","isLoaded","isBuffering","isPlaying","error","playbackPlaying","shouldPlay","e","forceWebview","type","youtubeId","autoPlay","createElement","ref","youtubePlayer","videoId","play","onReady","onYoutubeReady","onError","onYoutubeError","playbackRate","playerParams","cc_lang_pref","showClosedCaptions","vimeoId","style","marginLeft","marginRight","loop","controls","speed","time","embedUrl","startInLoadingState","javaScriptEnabled","scrollEnabled","automaticallyAdjustContentInsets","mediaPlaybackRequiresUserAction","styles","webView","_extends","vp","resizeMode","RESIZE_MODE_CONTAIN","useNativeControls","onLoadStart","onStreamLoadStart","onLoad","onStreamLoaded","onStreamError","onPlaybackStatusUpdate","onStreamStatusUpdate","render","player","showLoading","getYoutubePlayer","getVimeoId","getVimeoPlayer","getStreamPlayer","getWebviewPlayer","container","loadingContainer","color","create","flex","backgroundColor","alignItems","justifyContent","position","top","left","right","bottom"],"sources":["MediaPlayer.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { View, StyleSheet, Dimensions } from 'react-native';\nimport YoutubePlayer, { getYoutubeMeta } from 'react-native-youtube-iframe';\nimport { Vimeo } from 'react-native-vimeo-iframe';\nimport { WebView } from 'react-native-webview';\nimport { Video } from 'expo-av';\nimport { Spinner } from './Spinner';\n\nconst SCREEN_HEIGHT = Dimensions.get('window').height;\nconst SCREEN_WIDTH = Dimensions.get('window').width;\nconst EXPO_VIDEO_PROPS = { rate: 1, isMuted: false, volume: 1 };\nconst RETRY_RECOVER = 30000;\nconst RETRY_LOADING = 10000;\n\nclass MediaPlayer extends Component {\n constructor(props) {\n super(props);\n this.state = {\n deviceOrientation: null,\n isLandscape: false,\n isUrlLink: true,\n isYoutube: false,\n isVimeo: false,\n forceWebview: false,\n heightFactor: 0,\n playbackLoaded: false,\n playbackBuffering: false,\n playbackPlaying: false,\n readyToRender: false,\n };\n this.youtubePlayer = null;\n this.videoPlayer = null;\n this.checkStreamLoaded = null;\n this.retryLoading = false;\n this.orientationQueue = [];\n }\n\n componentDidMount = async () => {\n await this.setupForPlaying();\n };\n\n componentWillUnmount = () => {\n if (this.checkStreamLoaded) clearInterval(this.checkStreamLoaded);\n };\n\n getYoutubeVideoId = url => {\n url = url.replace(/(>|<)/gi, '').split(/(vi\\/|v=|\\/v\\/|youtu\\.be\\/|\\/embed\\/)/);\n if (url[2] !== undefined) {\n const ids = url[2].split(/[^0-9a-z_\\-]/i);\n return ids[0];\n } else {\n return '';\n }\n };\n\n getVimeoId = url => {\n const result = url.match(\n /(?:www\\.|player\\.)?vimeo.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/(?:[^\\/]*)\\/videos\\/|album\\/(?:\\d+)\\/video\\/|video\\/|)(\\d+)(?:[a-zA-Z0-9_\\-]+)?/i,\n );\n return result[1];\n };\n\n setupForPlaying = async () => {\n // Extract live stream info\n const { source, useVideoPlayer } = this.props;\n const isUrlLink = source && source.startsWith('http');\n const isYoutube = source && (source.includes('youtube.com/watch?v=') || source.includes('youtu.be/'));\n const isVimeo = source && source.includes('vimeo.com/');\n let heightFactor = 0;\n\n if (isYoutube) {\n const metadata = await getYoutubeMeta(this.getYoutubeVideoId(source));\n heightFactor = metadata.height / metadata.width;\n } else if (useVideoPlayer) {\n heightFactor = 0;\n } else {\n heightFactor = 0.565;\n }\n\n this.setState({ isUrlLink, isYoutube, isVimeo, playbackLoaded: isYoutube || isVimeo, heightFactor, readyToRender: true });\n };\n\n getStreamPlaybackUrl = () => {\n // return 'https://stream.mux.com/Ym4nKktRpGuZNBBBlzhxpyRwZLpvMlPRchcu01x6Ur600.m3u8';\n return `https://stream.mux.com/${this.props.playbackId}.m3u8`;\n };\n\n checkReloadStream = (wait = RETRY_LOADING, force = false) => {\n if (!force && this.retryLoading) return;\n\n console.log(`Check loading in ${wait} milliseconds...`);\n this.retryLoading = true;\n setTimeout(async () => {\n const { playbackLoaded, playbackBuffering } = this.state;\n try {\n if (playbackLoaded === false || playbackBuffering === true) {\n console.log('Reloading started');\n await this.videoPlayer.loadAsync(\n { uri: this.getStreamPlaybackUrl(), overrideFileExtensionAndroid: 'm3u8' },\n EXPO_VIDEO_PROPS,\n false,\n );\n } else {\n console.log('Already loaded - not reloading');\n }\n this.retryLoading = false;\n } catch {}\n }, wait);\n };\n\n isLandscape = deviceRotation => {\n const { beta, gamma } = deviceRotation;\n const absGamma = Math.abs(gamma);\n const absBeta = Math.abs(beta);\n const isGammaNegative = Math.sign(gamma) === -1;\n\n if (absGamma <= 0.04 && absBeta <= 0.24) {\n //Portrait mode, on a flat surface.\n return false;\n } else if ((absGamma <= 1.0 || absGamma >= 2.3) && absBeta >= 0.5) {\n //General Portrait mode, accounting for forward and back tilt on the top of the phone.\n return false;\n } else {\n if (isGammaNegative) {\n //Landscape mode with the top of the phone to the left.\n return true;\n } else {\n //Landscape mode with the top of the phone to the right.\n return true;\n }\n }\n };\n\n onMotionChange = async changeEvent => {\n const deviceRotation = changeEvent.rotation;\n const deviceOrientation = changeEvent.orientation;\n const isLandscape = this.isLandscape(deviceRotation);\n this.orientationQueue.push(isLandscape);\n if (this.orientationQueue.length > 2) this.orientationQueue = this.orientationQueue.slice(-2);\n // console.log('onMotionChange - orientationQueue', this.orientationQueue);\n if (\n isLandscape !== this.state.isLandscape &&\n isLandscape === (Math.abs(deviceOrientation) === 90) &&\n this.orientationQueue.every(i => i === isLandscape)\n ) {\n this.setState({ isLandscape }, () => {\n // console.log('isLandscape', this.state.isLandscape);\n if (this.props.orientationChanged) this.props.orientationChanged(this.state.isLandscape);\n });\n }\n };\n\n onStreamLoadStart = () => {\n console.log('Stream load started');\n this.checkStreamLoaded = setInterval(() => {\n const { playbackLoaded } = this.state;\n if (playbackLoaded === false) {\n console.log('Stream loading failed unexpectedly');\n this.checkReloadStream(1000, true);\n } else {\n clearInterval(this.checkStreamLoaded);\n }\n }, RETRY_RECOVER);\n };\n\n onStreamLoaded = status => {\n console.log(`Stream loaded - isLoaded:${status.isLoaded}, isBuffering:${status.isBuffering}, isPlaying:${status.isPlaying}`);\n };\n\n onStreamError = error => {\n console.log('Stream error', error);\n };\n\n onStreamStatusUpdate = status => {\n this.setState(\n {\n playbackLoaded: status.isLoaded,\n playbackBuffering: status.isBuffering,\n playbackPlaying: status.isPlaying,\n },\n () => {\n const { playbackLoaded, playbackBuffering, playbackPlaying, shouldPlay } = this.state;\n // console.log(`Status updated - isLoaded:${playbackLoaded}, isBuffering:${playbackBuffering}, isPlaying:${playbackPlaying}`);\n if (playbackLoaded === false && playbackBuffering === undefined && playbackPlaying === undefined) {\n this.checkReloadStream();\n } else if (playbackLoaded === true && playbackBuffering === true) {\n this.checkReloadStream(RETRY_RECOVER);\n }\n },\n );\n };\n\n onYoutubeError = e => {\n // console.log('onYoutubeError', e);\n this.setState({ forceWebview: true });\n };\n\n onYoutubeReady = () => {\n // console.log('onYoutubeReady');\n };\n\n onVideoPlayStatusUpdate = status => {\n // console.log('onVideoPlayStatusUpdate', status);\n };\n\n onVideoPlayError = error => {\n if (error && error.type === 'NonFatal') {\n return;\n }\n // console.log('onVideoPlayError', error);\n this.setState({ forceWebview: true });\n };\n\n getYoutubePlayer = (youtubeId, width, height, autoPlay) => (\n <YoutubePlayer\n ref={ref => (this.youtubePlayer = ref)}\n height={height}\n width={width}\n videoId={youtubeId}\n play={autoPlay}\n // onChangeState={event => console.log('onChangeState', event)}\n onReady={this.onYoutubeReady}\n onError={this.onYoutubeError}\n // onPlaybackQualityChange={q => console.log('onPlaybackQualityChange', q)}\n volume={50}\n playbackRate={1}\n playerParams={{\n cc_lang_pref: 'us',\n showClosedCaptions: true,\n }}\n />\n );\n\n getVimeoPlayer = (vimeoId, width, height, autoPlay) => (\n <View style={{ width, height }}>\n <Vimeo\n style={{ marginLeft: -8, marginRight: -5 }}\n videoId={vimeoId}\n // onReady={() => console.log('Video is ready')}\n // onPlay={() => console.log('Video is playing')}\n // onPlayProgress={data => console.log('Video progress data:', data)}\n // onFinish={() => console.log('Video is finished')}\n loop={false}\n autoPlay={autoPlay}\n controls={true}\n speed={true}\n time={'0m0s'}\n />\n </View>\n );\n\n getWebviewPlayer = (embedUrl, width, height) => (\n <WebView\n startInLoadingState\n javaScriptEnabled\n scrollEnabled={false}\n automaticallyAdjustContentInsets={false}\n mediaPlaybackRequiresUserAction\n style={[styles.webView, { width, height }]}\n source={{ uri: embedUrl }}\n />\n );\n\n getStreamPlayer = (embedUrl, width, height, autoPlay) => (\n <Video\n ref={vp => {\n this.videoPlayer = vp;\n }}\n source={{ uri: embedUrl }}\n {...EXPO_VIDEO_PROPS}\n shouldPlay={autoPlay}\n resizeMode={Video.RESIZE_MODE_CONTAIN}\n useNativeControls\n style={{ width, height }}\n onLoadStart={this.onStreamLoadStart}\n onLoad={this.onStreamLoaded}\n onError={this.onStreamError}\n onPlaybackStatusUpdate={this.onStreamStatusUpdate}\n />\n );\n\n // getVideoPlayer = (embedUrl, width, height, autoPlay) => (\n // <VideoPlayer\n // videoProps={{\n // shouldPlay: autoPlay,\n // resizeMode: Video.RESIZE_MODE_CONTAIN,\n // source: { uri: embedUrl },\n // }}\n // showFullscreenButton={false}\n // errorCallback={this.onVideoPlayError}\n // playbackCallback={this.onVideoPlayStatusUpdate}\n // height={height}\n // width={width}\n // />\n // );\n\n render() {\n let width, height;\n const { playbackId, source, autoPlay, useVideoPlayer } = this.props;\n const {\n readyToRender,\n isLandscape,\n heightFactor,\n isUrlLink,\n isYoutube,\n isVimeo,\n forceWebview,\n playbackLoaded,\n playbackBuffering,\n } = this.state;\n if (!readyToRender) return null;\n\n if (isLandscape) {\n width = SCREEN_HEIGHT;\n height = SCREEN_WIDTH;\n } else {\n width = SCREEN_WIDTH;\n height = heightFactor ? SCREEN_WIDTH * heightFactor : SCREEN_HEIGHT;\n }\n\n let embedUrl, player, showLoading;\n if (!forceWebview) {\n if (isYoutube) {\n const youtubeId = this.getYoutubeVideoId(source);\n embedUrl = youtubeId ? `https://www.youtube.com/embed/${youtubeId}` : source;\n // console.log('getYoutubePlayer', youtubeId, width, height, autoPlay);\n player = this.getYoutubePlayer(youtubeId, width, height, autoPlay);\n } else if (isVimeo) {\n const vimeoId = this.getVimeoId(source);\n embedUrl = source;\n // console.log('getVimeoPlayer', vimeoId, width, height, autoPlay);\n player = this.getVimeoPlayer(vimeoId, width, height, autoPlay);\n } else if (playbackId) {\n embedUrl = this.getStreamPlaybackUrl();\n // console.log('getStreamPlayer', embedUrl, width, height, autoPlay);\n player = this.getStreamPlayer(embedUrl, width, height, autoPlay);\n showLoading = true;\n } else if (useVideoPlayer) {\n embedUrl = source;\n // console.log('getVideoPlayer', embedUrl, width, height, autoPlay);\n player = this.getStreamPlayer(embedUrl, width, height, autoPlay);\n }\n }\n if (!player && isUrlLink) {\n embedUrl = source;\n console.log('getWebviewPlayer', embedUrl, width, height);\n player = this.getWebviewPlayer(embedUrl, width, height);\n }\n\n // console.log({\n // Streaming: embedUrl,\n // Landscape: isLandscape,\n // Loaded: playbackLoaded,\n // Buffering: playbackBuffering,\n // LoadingIndicator: showLoading,\n // Width: width,\n // Height: height,\n // HeightFactor: heightFactor,\n // isYoutube,\n // isVimeo,\n // playbackId,\n // useVideoPlayer,\n // });\n return (\n <View style={styles.container}>\n {player}\n {showLoading && (!playbackLoaded || playbackBuffering) && (\n <View style={styles.loadingContainer}>\n <Spinner color={'#fff'} />\n </View>\n )}\n </View>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#000',\n alignItems: 'center',\n justifyContent: 'center',\n },\n webView: {\n flex: 1,\n },\n loadingContainer: {\n position: 'absolute',\n top: 50,\n left: 0,\n right: 0,\n bottom: 50,\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n\nexport default MediaPlayer;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,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AAc,IAAIS,iBAAiB,CAAC,iBACpDxD,KAAA,CAAAkG,aAAA,CAAChG,IAAI;MAAC8G,KAAK,EAAEa,MAAM,CAACuB;IAAiB,gBACnCpJ,KAAA,CAAAkG,aAAA,CAACxF,OAAO;MAAC2I,KAAK,EAAE;IAAO,CAAE,CACrB,CAEJ,CAAC;EAEX;AACF;AAEA,MAAMxB,MAAM,GAAG1H,UAAU,CAACmJ,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE,MAAM;IACvBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACD5B,OAAO,EAAE;IACPyB,IAAI,EAAE;EACR,CAAC;EACDH,gBAAgB,EAAE;IAChBO,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,EAAE;IACVL,cAAc,EAAE,QAAQ;IACxBD,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAenI,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Component","View","StyleSheet","Dimensions","YoutubePlayer","getYoutubeMeta","Vimeo","WebView","Video","ResizeMode","Spinner","SCREEN_HEIGHT","get","height","SCREEN_WIDTH","width","EXPO_VIDEO_PROPS","rate","isMuted","volume","RETRY_RECOVER","RETRY_LOADING","MediaPlayer","constructor","props","_defineProperty","setupForPlaying","checkStreamLoaded","clearInterval","url","replace","split","undefined","ids","result","match","source","useVideoPlayer","isUrlLink","startsWith","isYoutube","includes","isVimeo","heightFactor","metadata","getYoutubeVideoId","setState","playbackLoaded","readyToRender","playbackId","wait","force","retryLoading","console","log","setTimeout","playbackBuffering","state","videoPlayer","loadAsync","uri","getStreamPlaybackUrl","overrideFileExtensionAndroid","deviceRotation","beta","gamma","absGamma","Math","abs","absBeta","isGammaNegative","sign","changeEvent","rotation","deviceOrientation","orientation","isLandscape","orientationQueue","push","length","slice","every","i","orientationChanged","setInterval","checkReloadStream","status","isLoaded","isBuffering","isPlaying","error","playbackPlaying","shouldPlay","e","forceWebview","type","youtubeId","autoPlay","createElement","ref","youtubePlayer","videoId","play","onReady","onYoutubeReady","onError","onYoutubeError","playbackRate","playerParams","cc_lang_pref","showClosedCaptions","vimeoId","style","marginLeft","marginRight","loop","controls","speed","time","embedUrl","startInLoadingState","javaScriptEnabled","scrollEnabled","automaticallyAdjustContentInsets","mediaPlaybackRequiresUserAction","styles","webView","_extends","vp","resizeMode","CONTAIN","useNativeControls","onLoadStart","onStreamLoadStart","onLoad","onStreamLoaded","onStreamError","onPlaybackStatusUpdate","onStreamStatusUpdate","render","player","showLoading","getYoutubePlayer","getVimeoId","getVimeoPlayer","getStreamPlayer","getWebviewPlayer","container","loadingContainer","color","create","flex","backgroundColor","alignItems","justifyContent","position","top","left","right","bottom"],"sources":["MediaPlayer.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { View, StyleSheet, Dimensions } from \"react-native\";\nimport YoutubePlayer, { getYoutubeMeta } from \"react-native-youtube-iframe\";\nimport { Vimeo } from \"react-native-vimeo-iframe\";\nimport { WebView } from \"react-native-webview\";\nimport { Video, ResizeMode } from \"expo-av\";\nimport { Spinner } from \"./Spinner\";\n\nconst SCREEN_HEIGHT = Dimensions.get(\"window\").height;\nconst SCREEN_WIDTH = Dimensions.get(\"window\").width;\nconst EXPO_VIDEO_PROPS = { rate: 1, isMuted: false, volume: 1 };\nconst RETRY_RECOVER = 30000;\nconst RETRY_LOADING = 10000;\n\nclass MediaPlayer extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tdeviceOrientation: null,\n\t\t\tisLandscape: false,\n\t\t\tisUrlLink: true,\n\t\t\tisYoutube: false,\n\t\t\tisVimeo: false,\n\t\t\tforceWebview: false,\n\t\t\theightFactor: 0,\n\t\t\tplaybackLoaded: false,\n\t\t\tplaybackBuffering: false,\n\t\t\tplaybackPlaying: false,\n\t\t\treadyToRender: false,\n\t\t};\n\t\tthis.youtubePlayer = null;\n\t\tthis.videoPlayer = null;\n\t\tthis.checkStreamLoaded = null;\n\t\tthis.retryLoading = false;\n\t\tthis.orientationQueue = [];\n\t}\n\n\tcomponentDidMount = async () => {\n\t\tawait this.setupForPlaying();\n\t};\n\n\tcomponentWillUnmount = () => {\n\t\tif (this.checkStreamLoaded) clearInterval(this.checkStreamLoaded);\n\t};\n\n\tgetYoutubeVideoId = (url) => {\n\t\turl = url\n\t\t\t.replace(/(>|<)/gi, \"\")\n\t\t\t.split(/(vi\\/|v=|\\/v\\/|youtu\\.be\\/|\\/embed\\/)/);\n\t\tif (url[2] !== undefined) {\n\t\t\tconst ids = url[2].split(/[^0-9a-z_\\-]/i);\n\t\t\treturn ids[0];\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tgetVimeoId = (url) => {\n\t\tconst result = url.match(\n\t\t\t/(?:www\\.|player\\.)?vimeo.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/(?:[^\\/]*)\\/videos\\/|album\\/(?:\\d+)\\/video\\/|video\\/|)(\\d+)(?:[a-zA-Z0-9_\\-]+)?/i,\n\t\t);\n\t\treturn result[1];\n\t};\n\n\tsetupForPlaying = async () => {\n\t\t// Extract live stream info\n\t\tconst { source, useVideoPlayer } = this.props;\n\t\tconst isUrlLink = source && source.startsWith(\"http\");\n\t\tconst isYoutube =\n\t\t\tsource &&\n\t\t\t(source.includes(\"youtube.com/watch?v=\") || source.includes(\"youtu.be/\"));\n\t\tconst isVimeo = source && source.includes(\"vimeo.com/\");\n\t\tlet heightFactor = 0;\n\n\t\tif (isYoutube) {\n\t\t\tconst metadata = await getYoutubeMeta(this.getYoutubeVideoId(source));\n\t\t\theightFactor = metadata.height / metadata.width;\n\t\t} else if (useVideoPlayer) {\n\t\t\theightFactor = 0;\n\t\t} else {\n\t\t\theightFactor = 0.565;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tisUrlLink,\n\t\t\tisYoutube,\n\t\t\tisVimeo,\n\t\t\tplaybackLoaded: isYoutube || isVimeo,\n\t\t\theightFactor,\n\t\t\treadyToRender: true,\n\t\t});\n\t};\n\n\tgetStreamPlaybackUrl = () => {\n\t\t// return 'https://stream.mux.com/Ym4nKktRpGuZNBBBlzhxpyRwZLpvMlPRchcu01x6Ur600.m3u8';\n\t\treturn `https://stream.mux.com/${this.props.playbackId}.m3u8`;\n\t};\n\n\tcheckReloadStream = (wait = RETRY_LOADING, force = false) => {\n\t\tif (!force && this.retryLoading) return;\n\n\t\tconsole.log(`Check loading in ${wait} milliseconds...`);\n\t\tthis.retryLoading = true;\n\t\tsetTimeout(async () => {\n\t\t\tconst { playbackLoaded, playbackBuffering } = this.state;\n\t\t\ttry {\n\t\t\t\tif (playbackLoaded === false || playbackBuffering === true) {\n\t\t\t\t\tconsole.log(\"Reloading started\");\n\t\t\t\t\tawait this.videoPlayer.loadAsync(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\turi: this.getStreamPlaybackUrl(),\n\t\t\t\t\t\t\toverrideFileExtensionAndroid: \"m3u8\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tEXPO_VIDEO_PROPS,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"Already loaded - not reloading\");\n\t\t\t\t}\n\t\t\t\tthis.retryLoading = false;\n\t\t\t} catch {}\n\t\t}, wait);\n\t};\n\n\tisLandscape = (deviceRotation) => {\n\t\tconst { beta, gamma } = deviceRotation;\n\t\tconst absGamma = Math.abs(gamma);\n\t\tconst absBeta = Math.abs(beta);\n\t\tconst isGammaNegative = Math.sign(gamma) === -1;\n\n\t\tif (absGamma <= 0.04 && absBeta <= 0.24) {\n\t\t\t//Portrait mode, on a flat surface.\n\t\t\treturn false;\n\t\t} else if ((absGamma <= 1.0 || absGamma >= 2.3) && absBeta >= 0.5) {\n\t\t\t//General Portrait mode, accounting for forward and back tilt on the top of the phone.\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (isGammaNegative) {\n\t\t\t\t//Landscape mode with the top of the phone to the left.\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t//Landscape mode with the top of the phone to the right.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t};\n\n\tonMotionChange = async (changeEvent) => {\n\t\tconst deviceRotation = changeEvent.rotation;\n\t\tconst deviceOrientation = changeEvent.orientation;\n\t\tconst isLandscape = this.isLandscape(deviceRotation);\n\t\tthis.orientationQueue.push(isLandscape);\n\t\tif (this.orientationQueue.length > 2)\n\t\t\tthis.orientationQueue = this.orientationQueue.slice(-2);\n\t\t// console.log('onMotionChange - orientationQueue', this.orientationQueue);\n\t\tif (\n\t\t\tisLandscape !== this.state.isLandscape &&\n\t\t\tisLandscape === (Math.abs(deviceOrientation) === 90) &&\n\t\t\tthis.orientationQueue.every((i) => i === isLandscape)\n\t\t) {\n\t\t\tthis.setState({ isLandscape }, () => {\n\t\t\t\t// console.log('isLandscape', this.state.isLandscape);\n\t\t\t\tif (this.props.orientationChanged)\n\t\t\t\t\tthis.props.orientationChanged(this.state.isLandscape);\n\t\t\t});\n\t\t}\n\t};\n\n\tonStreamLoadStart = () => {\n\t\tconsole.log(\"Stream load started\");\n\t\tthis.checkStreamLoaded = setInterval(() => {\n\t\t\tconst { playbackLoaded } = this.state;\n\t\t\tif (playbackLoaded === false) {\n\t\t\t\tconsole.log(\"Stream loading failed unexpectedly\");\n\t\t\t\tthis.checkReloadStream(1000, true);\n\t\t\t} else {\n\t\t\t\tclearInterval(this.checkStreamLoaded);\n\t\t\t}\n\t\t}, RETRY_RECOVER);\n\t};\n\n\tonStreamLoaded = (status) => {\n\t\tconsole.log(\n\t\t\t`Stream loaded - isLoaded:${status.isLoaded}, isBuffering:${status.isBuffering}, isPlaying:${status.isPlaying}`,\n\t\t);\n\t};\n\n\tonStreamError = (error) => {\n\t\tconsole.log(\"Stream error\", error);\n\t};\n\n\tonStreamStatusUpdate = (status) => {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tplaybackLoaded: status.isLoaded,\n\t\t\t\tplaybackBuffering: status.isBuffering,\n\t\t\t\tplaybackPlaying: status.isPlaying,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tconst {\n\t\t\t\t\tplaybackLoaded,\n\t\t\t\t\tplaybackBuffering,\n\t\t\t\t\tplaybackPlaying,\n\t\t\t\t\tshouldPlay,\n\t\t\t\t} = this.state;\n\t\t\t\t// console.log(`Status updated - isLoaded:${playbackLoaded}, isBuffering:${playbackBuffering}, isPlaying:${playbackPlaying}`);\n\t\t\t\tif (\n\t\t\t\t\tplaybackLoaded === false &&\n\t\t\t\t\tplaybackBuffering === undefined &&\n\t\t\t\t\tplaybackPlaying === undefined\n\t\t\t\t) {\n\t\t\t\t\tthis.checkReloadStream();\n\t\t\t\t} else if (playbackLoaded === true && playbackBuffering === true) {\n\t\t\t\t\tthis.checkReloadStream(RETRY_RECOVER);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\t};\n\n\tonYoutubeError = (e) => {\n\t\t// console.log('onYoutubeError', e);\n\t\tthis.setState({ forceWebview: true });\n\t};\n\n\tonYoutubeReady = () => {\n\t\t// console.log('onYoutubeReady');\n\t};\n\n\tonVideoPlayStatusUpdate = (status) => {\n\t\t// console.log('onVideoPlayStatusUpdate', status);\n\t};\n\n\tonVideoPlayError = (error) => {\n\t\tif (error && error.type === \"NonFatal\") {\n\t\t\treturn;\n\t\t}\n\t\t// console.log('onVideoPlayError', error);\n\t\tthis.setState({ forceWebview: true });\n\t};\n\n\tgetYoutubePlayer = (youtubeId, width, height, autoPlay) => (\n\t\t<YoutubePlayer\n\t\t\tref={(ref) => (this.youtubePlayer = ref)}\n\t\t\theight={height}\n\t\t\twidth={width}\n\t\t\tvideoId={youtubeId}\n\t\t\tplay={autoPlay}\n\t\t\t// onChangeState={event => console.log('onChangeState', event)}\n\t\t\tonReady={this.onYoutubeReady}\n\t\t\tonError={this.onYoutubeError}\n\t\t\t// onPlaybackQualityChange={q => console.log('onPlaybackQualityChange', q)}\n\t\t\tvolume={50}\n\t\t\tplaybackRate={1}\n\t\t\tplayerParams={{\n\t\t\t\tcc_lang_pref: \"us\",\n\t\t\t\tshowClosedCaptions: true,\n\t\t\t}}\n\t\t/>\n\t);\n\n\tgetVimeoPlayer = (vimeoId, width, height, autoPlay) => (\n\t\t<View style={{ width, height }}>\n\t\t\t<Vimeo\n\t\t\t\tstyle={{ marginLeft: -8, marginRight: -5 }}\n\t\t\t\tvideoId={vimeoId}\n\t\t\t\t// onReady={() => console.log('Video is ready')}\n\t\t\t\t// onPlay={() => console.log('Video is playing')}\n\t\t\t\t// onPlayProgress={data => console.log('Video progress data:', data)}\n\t\t\t\t// onFinish={() => console.log('Video is finished')}\n\t\t\t\tloop={false}\n\t\t\t\tautoPlay={autoPlay}\n\t\t\t\tcontrols={true}\n\t\t\t\tspeed={true}\n\t\t\t\ttime={\"0m0s\"}\n\t\t\t/>\n\t\t</View>\n\t);\n\n\tgetWebviewPlayer = (embedUrl, width, height) => (\n\t\t<WebView\n\t\t\tstartInLoadingState\n\t\t\tjavaScriptEnabled\n\t\t\tscrollEnabled={false}\n\t\t\tautomaticallyAdjustContentInsets={false}\n\t\t\tmediaPlaybackRequiresUserAction\n\t\t\tstyle={[styles.webView, { width, height }]}\n\t\t\tsource={{ uri: embedUrl }}\n\t\t/>\n\t);\n\n\tgetStreamPlayer = (embedUrl, width, height, autoPlay) => (\n\t\t<Video\n\t\t\tref={(vp) => {\n\t\t\t\tthis.videoPlayer = vp;\n\t\t\t}}\n\t\t\tsource={{ uri: embedUrl }}\n\t\t\t{...EXPO_VIDEO_PROPS}\n\t\t\tshouldPlay={autoPlay}\n\t\t\tresizeMode={ResizeMode.CONTAIN}\n\t\t\tuseNativeControls\n\t\t\tstyle={{ width, height }}\n\t\t\tonLoadStart={this.onStreamLoadStart}\n\t\t\tonLoad={this.onStreamLoaded}\n\t\t\tonError={this.onStreamError}\n\t\t\tonPlaybackStatusUpdate={this.onStreamStatusUpdate}\n\t\t/>\n\t);\n\n\t// getVideoPlayer = (embedUrl, width, height, autoPlay) => (\n\t// <VideoPlayer\n\t// videoProps={{\n\t// shouldPlay: autoPlay,\n\t// resizeMode: Video.RESIZE_MODE_CONTAIN,\n\t// source: { uri: embedUrl },\n\t// }}\n\t// showFullscreenButton={false}\n\t// errorCallback={this.onVideoPlayError}\n\t// playbackCallback={this.onVideoPlayStatusUpdate}\n\t// height={height}\n\t// width={width}\n\t// />\n\t// );\n\n\trender() {\n\t\tlet width, height;\n\t\tconst { playbackId, source, autoPlay, useVideoPlayer } = this.props;\n\t\tconst {\n\t\t\treadyToRender,\n\t\t\tisLandscape,\n\t\t\theightFactor,\n\t\t\tisUrlLink,\n\t\t\tisYoutube,\n\t\t\tisVimeo,\n\t\t\tforceWebview,\n\t\t\tplaybackLoaded,\n\t\t\tplaybackBuffering,\n\t\t} = this.state;\n\t\tif (!readyToRender) return null;\n\n\t\tif (isLandscape) {\n\t\t\twidth = SCREEN_HEIGHT;\n\t\t\theight = SCREEN_WIDTH;\n\t\t} else {\n\t\t\twidth = SCREEN_WIDTH;\n\t\t\theight = heightFactor ? SCREEN_WIDTH * heightFactor : SCREEN_HEIGHT;\n\t\t}\n\n\t\tlet embedUrl, player, showLoading;\n\t\tif (!forceWebview) {\n\t\t\tif (isYoutube) {\n\t\t\t\tconst youtubeId = this.getYoutubeVideoId(source);\n\t\t\t\tembedUrl = youtubeId\n\t\t\t\t\t? `https://www.youtube.com/embed/${youtubeId}`\n\t\t\t\t\t: source;\n\t\t\t\t// console.log('getYoutubePlayer', youtubeId, width, height, autoPlay);\n\t\t\t\tplayer = this.getYoutubePlayer(youtubeId, width, height, autoPlay);\n\t\t\t} else if (isVimeo) {\n\t\t\t\tconst vimeoId = this.getVimeoId(source);\n\t\t\t\tembedUrl = source;\n\t\t\t\t// console.log('getVimeoPlayer', vimeoId, width, height, autoPlay);\n\t\t\t\tplayer = this.getVimeoPlayer(vimeoId, width, height, autoPlay);\n\t\t\t} else if (playbackId) {\n\t\t\t\tembedUrl = this.getStreamPlaybackUrl();\n\t\t\t\t// console.log('getStreamPlayer', embedUrl, width, height, autoPlay);\n\t\t\t\tplayer = this.getStreamPlayer(embedUrl, width, height, autoPlay);\n\t\t\t\tshowLoading = true;\n\t\t\t} else if (useVideoPlayer) {\n\t\t\t\tembedUrl = source;\n\t\t\t\t// console.log('getVideoPlayer', embedUrl, width, height, autoPlay);\n\t\t\t\tplayer = this.getStreamPlayer(embedUrl, width, height, autoPlay);\n\t\t\t}\n\t\t}\n\t\tif (!player && isUrlLink) {\n\t\t\tembedUrl = source;\n\t\t\tconsole.log(\"getWebviewPlayer\", embedUrl, width, height);\n\t\t\tplayer = this.getWebviewPlayer(embedUrl, width, height);\n\t\t}\n\n\t\t// console.log({\n\t\t// Streaming: embedUrl,\n\t\t// Landscape: isLandscape,\n\t\t// Loaded: playbackLoaded,\n\t\t// Buffering: playbackBuffering,\n\t\t// LoadingIndicator: showLoading,\n\t\t// Width: width,\n\t\t// Height: height,\n\t\t// HeightFactor: heightFactor,\n\t\t// isYoutube,\n\t\t// isVimeo,\n\t\t// playbackId,\n\t\t// useVideoPlayer,\n\t\t// });\n\t\treturn (\n\t\t\t<View style={styles.container}>\n\t\t\t\t{player}\n\t\t\t\t{showLoading && (!playbackLoaded || playbackBuffering) && (\n\t\t\t\t\t<View style={styles.loadingContainer}>\n\t\t\t\t\t\t<Spinner color={\"#fff\"} />\n\t\t\t\t\t</View>\n\t\t\t\t)}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tcontainer: {\n\t\tflex: 1,\n\t\tbackgroundColor: \"#000\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t},\n\twebView: {\n\t\tflex: 1,\n\t},\n\tloadingContainer: {\n\t\tposition: \"absolute\",\n\t\ttop: 50,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbott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KAAA,CAAAmG,aAAA,CAACjG,IAAI;MAAC+G,KAAK,EAAEa,MAAM,CAACsB;IAAU,GAC5BP,MAAM,EACNC,WAAW,KAAK,CAAC9F,cAAc,IAAIS,iBAAiB,CAAC,iBACrDzD,KAAA,CAAAmG,aAAA,CAACjG,IAAI;MAAC+G,KAAK,EAAEa,MAAM,CAACuB;IAAiB,gBACpCrJ,KAAA,CAAAmG,aAAA,CAACxF,OAAO;MAAC2I,KAAK,EAAE;IAAO,CAAE,CACpB,CAEF,CAAC;EAET;AACD;AAEA,MAAMxB,MAAM,GAAG3H,UAAU,CAACoJ,MAAM,CAAC;EAChCH,SAAS,EAAE;IACVI,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE,MAAM;IACvBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EACjB,CAAC;EACD5B,OAAO,EAAE;IACRyB,IAAI,EAAE;EACP,CAAC;EACDH,gBAAgB,EAAE;IACjBO,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,EAAE;IACVL,cAAc,EAAE,QAAQ;IACxBD,UAAU,EAAE;EACb;AACD,CAAC,CAAC;AAEF,eAAenI,WAAW","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PureComponent } from
|
|
2
|
-
import { View, Modal, TouchableWithoutFeedback, KeyboardAvoidingView, Platform } from
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import { View, Modal, TouchableWithoutFeedback, KeyboardAvoidingView, Platform } from "react-native";
|
|
3
3
|
class MiddlePopup extends PureComponent {
|
|
4
4
|
render() {
|
|
5
5
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -8,7 +8,7 @@ class MiddlePopup extends PureComponent {
|
|
|
8
8
|
animationType: "fade",
|
|
9
9
|
onRequestClose: this.props.onClose
|
|
10
10
|
}, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
11
|
-
behavior: this.props.keyboardAvoid && Platform.OS ===
|
|
11
|
+
behavior: this.props.keyboardAvoid && Platform.OS === "ios" && "padding",
|
|
12
12
|
style: styles.popup
|
|
13
13
|
}, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
14
14
|
onPress: this.props.onClose
|
|
@@ -22,12 +22,12 @@ class MiddlePopup extends PureComponent {
|
|
|
22
22
|
const styles = {
|
|
23
23
|
popup: {
|
|
24
24
|
flex: 1,
|
|
25
|
-
justifyContent:
|
|
26
|
-
alignItems:
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
alignItems: "center"
|
|
27
27
|
},
|
|
28
28
|
popupOverlay: {
|
|
29
|
-
position:
|
|
30
|
-
backgroundColor:
|
|
29
|
+
position: "absolute",
|
|
30
|
+
backgroundColor: "rgba(19, 19, 26, .25)",
|
|
31
31
|
top: 0,
|
|
32
32
|
left: 0,
|
|
33
33
|
right: 0,
|
|
@@ -35,8 +35,8 @@ const styles = {
|
|
|
35
35
|
},
|
|
36
36
|
popupContent: {
|
|
37
37
|
borderRadius: 12,
|
|
38
|
-
backgroundColor:
|
|
39
|
-
alignItems:
|
|
38
|
+
backgroundColor: "#fff",
|
|
39
|
+
alignItems: "center"
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
export { MiddlePopup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PureComponent","View","Modal","TouchableWithoutFeedback","KeyboardAvoidingView","Platform","MiddlePopup","render","createElement","visible","props","transparent","animationType","onRequestClose","onClose","behavior","keyboardAvoid","OS","style","styles","popup","onPress","popupOverlay","popupContent","children","flex","justifyContent","alignItems","position","backgroundColor","top","left","right","bottom","borderRadius"],"sources":["MiddlePopup.js"],"sourcesContent":["import React, { PureComponent } from
|
|
1
|
+
{"version":3,"names":["React","PureComponent","View","Modal","TouchableWithoutFeedback","KeyboardAvoidingView","Platform","MiddlePopup","render","createElement","visible","props","transparent","animationType","onRequestClose","onClose","behavior","keyboardAvoid","OS","style","styles","popup","onPress","popupOverlay","popupContent","children","flex","justifyContent","alignItems","position","backgroundColor","top","left","right","bottom","borderRadius"],"sources":["MiddlePopup.js"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport {\n\tView,\n\tModal,\n\tTouchableWithoutFeedback,\n\tKeyboardAvoidingView,\n\tPlatform,\n} from \"react-native\";\n\nclass MiddlePopup extends PureComponent {\n\trender() {\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tvisible={this.props.visible}\n\t\t\t\ttransparent\n\t\t\t\tanimationType=\"fade\"\n\t\t\t\tonRequestClose={this.props.onClose}\n\t\t\t>\n\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\tbehavior={\n\t\t\t\t\t\tthis.props.keyboardAvoid && Platform.OS === \"ios\" && \"padding\"\n\t\t\t\t\t}\n\t\t\t\t\tstyle={styles.popup}\n\t\t\t\t>\n\t\t\t\t\t<TouchableWithoutFeedback onPress={this.props.onClose}>\n\t\t\t\t\t\t<View style={styles.popupOverlay} />\n\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t<View style={[styles.popupContent, this.props.style]}>\n\t\t\t\t\t\t{this.props.children}\n\t\t\t\t\t</View>\n\t\t\t\t</KeyboardAvoidingView>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tpopup: {\n\t\tflex: 1,\n\t\tjustifyContent: \"center\",\n\t\talignItems: \"center\",\n\t},\n\tpopupOverlay: {\n\t\tposition: \"absolute\",\n\t\tbackgroundColor: \"rgba(19, 19, 26, .25)\",\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbottom: 0,\n\t},\n\tpopupContent: {\n\t\tborderRadius: 12,\n\t\tbackgroundColor: \"#fff\",\n\t\talignItems: \"center\",\n\t},\n};\n\nexport { MiddlePopup };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SACCC,IAA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,MAAM;IACvBF,UAAU,EAAE;EACb;AACD,CAAC;AAED,SAASrB,WAAW","ignoreList":[]}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
import React, { Component } from
|
|
5
|
-
import { View,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import * as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import { View, TouchableOpacity, Modal, Dimensions } from "react-native";
|
|
6
|
+
import { Text } from "./Text";
|
|
7
|
+
import { Icon } from "@rneui/themed";
|
|
8
|
+
import { WebView } from "react-native-webview";
|
|
9
|
+
import * as FileSystem from "expo-file-system";
|
|
10
|
+
import * as Sharing from "expo-sharing";
|
|
11
|
+
import { FontAwesome } from "./Icon";
|
|
12
|
+
import { Spinner } from "./Spinner";
|
|
13
|
+
import { StatusBarHeight, getFileName } from "../helper";
|
|
14
|
+
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
14
15
|
class PDFPopup extends Component {
|
|
15
16
|
constructor(...args) {
|
|
16
17
|
super(...args);
|
|
@@ -20,7 +21,7 @@ class PDFPopup extends Component {
|
|
|
20
21
|
_defineProperty(this, "download", async () => {
|
|
21
22
|
const downloadedFile = await FileSystem.downloadAsync(this.props.source, FileSystem.documentDirectory + getFileName(this.props.source));
|
|
22
23
|
const shareResult = await Sharing.shareAsync(downloadedFile.uri, {
|
|
23
|
-
UTI:
|
|
24
|
+
UTI: "public.item"
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
}
|
|
@@ -38,7 +39,7 @@ class PDFPopup extends Component {
|
|
|
38
39
|
this.props.onChangeIndex(index);
|
|
39
40
|
}
|
|
40
41
|
getUrl() {
|
|
41
|
-
const linkPrefix =
|
|
42
|
+
const linkPrefix = "http://drive.google.com/viewerng/viewer?embedded=true&url=";
|
|
42
43
|
return `${linkPrefix}${this.props.source}`;
|
|
43
44
|
}
|
|
44
45
|
closePopup() {
|
|
@@ -80,7 +81,7 @@ class PDFPopup extends Component {
|
|
|
80
81
|
}, /*#__PURE__*/React.createElement(View, {
|
|
81
82
|
style: {
|
|
82
83
|
flex: 1,
|
|
83
|
-
backgroundColor:
|
|
84
|
+
backgroundColor: "#000",
|
|
84
85
|
paddingTop: StatusBarHeight(0)
|
|
85
86
|
}
|
|
86
87
|
}, /*#__PURE__*/React.createElement(View, {
|
|
@@ -88,8 +89,8 @@ class PDFPopup extends Component {
|
|
|
88
89
|
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
89
90
|
onPress: this.closePopup.bind(this),
|
|
90
91
|
activeOpacity: 0.6
|
|
91
|
-
}, /*#__PURE__*/React.createElement(
|
|
92
|
-
name: "
|
|
92
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
93
|
+
name: "x",
|
|
93
94
|
style: [styles.menuIcon]
|
|
94
95
|
})), /*#__PURE__*/React.createElement(View, {
|
|
95
96
|
style: styles.titleContainer
|
|
@@ -105,7 +106,7 @@ class PDFPopup extends Component {
|
|
|
105
106
|
}))), /*#__PURE__*/React.createElement(View, {
|
|
106
107
|
style: {
|
|
107
108
|
flex: 1,
|
|
108
|
-
backgroundColor:
|
|
109
|
+
backgroundColor: "#fff"
|
|
109
110
|
}
|
|
110
111
|
}, this.state.loaded ? null : /*#__PURE__*/React.createElement(Spinner, {
|
|
111
112
|
style: {
|
|
@@ -113,17 +114,16 @@ class PDFPopup extends Component {
|
|
|
113
114
|
flex: 0
|
|
114
115
|
}
|
|
115
116
|
}), /*#__PURE__*/React.createElement(WebView, {
|
|
116
|
-
ref: "PDFWebView",
|
|
117
117
|
source: {
|
|
118
118
|
uri: this.getUrl()
|
|
119
119
|
},
|
|
120
120
|
renderError: e => {
|
|
121
|
-
console.log(
|
|
121
|
+
console.log("errored");
|
|
122
122
|
console.log(e);
|
|
123
123
|
},
|
|
124
124
|
style: [{
|
|
125
125
|
flex: 1,
|
|
126
|
-
backgroundColor:
|
|
126
|
+
backgroundColor: "#fff"
|
|
127
127
|
}],
|
|
128
128
|
onLoadStart: this.onLoadStarted.bind(this),
|
|
129
129
|
onLoadEnd: this.onLoadEnded.bind(this)
|
|
@@ -133,8 +133,8 @@ class PDFPopup extends Component {
|
|
|
133
133
|
const styles = {
|
|
134
134
|
container: {
|
|
135
135
|
flex: 1,
|
|
136
|
-
position:
|
|
137
|
-
backgroundColor:
|
|
136
|
+
position: "relative",
|
|
137
|
+
backgroundColor: "#000"
|
|
138
138
|
},
|
|
139
139
|
innerContainer: {
|
|
140
140
|
flex: 1,
|
|
@@ -145,28 +145,28 @@ const styles = {
|
|
|
145
145
|
fontSize: 25,
|
|
146
146
|
padding: 15,
|
|
147
147
|
width: 55,
|
|
148
|
-
textAlign:
|
|
149
|
-
color:
|
|
148
|
+
textAlign: "center",
|
|
149
|
+
color: "#fff",
|
|
150
150
|
zIndex: 3
|
|
151
151
|
},
|
|
152
152
|
headerContent: {
|
|
153
|
-
flexDirection:
|
|
154
|
-
alignItems:
|
|
153
|
+
flexDirection: "row",
|
|
154
|
+
alignItems: "center",
|
|
155
155
|
height: 70
|
|
156
156
|
},
|
|
157
157
|
titleContainer: {
|
|
158
158
|
flex: 1
|
|
159
159
|
},
|
|
160
160
|
title: {
|
|
161
|
-
color:
|
|
162
|
-
fontFamily:
|
|
161
|
+
color: "#fff",
|
|
162
|
+
fontFamily: "sf-semibold",
|
|
163
163
|
fontSize: 16,
|
|
164
|
-
textAlign:
|
|
164
|
+
textAlign: "center"
|
|
165
165
|
},
|
|
166
166
|
footerContent: {
|
|
167
|
-
flexDirection:
|
|
168
|
-
alignItems:
|
|
169
|
-
justifyContent:
|
|
167
|
+
flexDirection: "row",
|
|
168
|
+
alignItems: "center",
|
|
169
|
+
justifyContent: "center",
|
|
170
170
|
height: 70
|
|
171
171
|
//alignSelf: 'flex-end'
|
|
172
172
|
},
|
|
@@ -174,16 +174,16 @@ const styles = {
|
|
|
174
174
|
fontSize: 25,
|
|
175
175
|
padding: 15,
|
|
176
176
|
width: 55,
|
|
177
|
-
textAlign:
|
|
178
|
-
color:
|
|
177
|
+
textAlign: "center",
|
|
178
|
+
color: "#fff",
|
|
179
179
|
zIndex: 3
|
|
180
180
|
},
|
|
181
181
|
footerText: {
|
|
182
|
-
fontFamily:
|
|
182
|
+
fontFamily: "sf-regular",
|
|
183
183
|
fontSize: 14,
|
|
184
|
-
color:
|
|
184
|
+
color: "#fff",
|
|
185
185
|
width: 150,
|
|
186
|
-
textAlign:
|
|
186
|
+
textAlign: "center"
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
export { PDFPopup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","View","Text","TouchableOpacity","Modal","Dimensions","Icon","WebView","FileSystem","Sharing","Pl60Icon","Spinner","StatusBarHeight","getFileName","SCREEN_HEIGHT","get","height","PDFPopup","constructor","args","_defineProperty","loaded","downloadedFile","downloadAsync","props","source","documentDirectory","shareResult","shareAsync","uri","UTI","onLoadStarted","setState","onLoadEnded","onChangeIndex","index","getUrl","linkPrefix","closePopup","onClose","renderFooter","pdfCount","createElement","style","styles","footerContent","onPress","bind","activeOpacity","type","name","iconStyle","chevron","footerText","selectedIndex","render","visible","transparent","animationType","onRequestClose","flex","backgroundColor","paddingTop","headerContent","menuIcon","titleContainer","title","download","state","ref","renderError","e","console","log","onLoadStart","onLoadEnd","container","position","innerContainer","paddingLeft","paddingRight","fontSize","padding","width","textAlign","color","zIndex","flexDirection","alignItems","fontFamily","justifyContent"],"sources":["PDFPopup.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { View, Text, TouchableOpacity, Modal, Dimensions } from 'react-native';\nimport { Icon } from 'react-native-elements';\nimport { WebView } from 'react-native-webview';\nimport * as FileSystem from 'expo-file-system';\nimport * as Sharing from 'expo-sharing';\nimport { Pl60Icon } from '../fonts';\nimport { Spinner } from './Spinner';\nimport { StatusBarHeight, getFileName } from '../helper';\n\nconst SCREEN_HEIGHT = Dimensions.get('window').height;\n\nclass PDFPopup extends Component {\n state = {\n loaded: false,\n };\n\n onLoadStarted() {\n this.setState({\n loaded: false,\n });\n }\n\n onLoadEnded() {\n this.setState({\n loaded: true,\n });\n }\n\n onChangeIndex(index) {\n this.props.onChangeIndex(index);\n }\n\n getUrl() {\n const linkPrefix = 'http://drive.google.com/viewerng/viewer?embedded=true&url=';\n return `${linkPrefix}${this.props.source}`;\n }\n\n download = async () => {\n const downloadedFile = await FileSystem.downloadAsync(this.props.source, FileSystem.documentDirectory + getFileName(this.props.source));\n const shareResult = await Sharing.shareAsync(downloadedFile.uri, { UTI: 'public.item' });\n };\n\n closePopup() {\n this.props.onClose();\n }\n\n renderFooter() {\n if (this.props.pdfCount && this.props.pdfCount === 1) {\n return null;\n }\n return (\n <View style={styles.footerContent}>\n <TouchableOpacity onPress={this.onChangeIndex.bind(this, -1)} activeOpacity={0.6}>\n <Icon type=\"font-awesome\" name=\"angle-left\" iconStyle={[styles.chevron]} />\n </TouchableOpacity>\n <Text style={styles.footerText}>\n {this.props.selectedIndex + 1} / {this.props.pdfCount}\n </Text>\n <TouchableOpacity onPress={this.onChangeIndex.bind(this, 1)} activeOpacity={0.6}>\n <Icon type=\"font-awesome\" name=\"angle-right\" iconStyle={[styles.chevron]} />\n </TouchableOpacity>\n </View>\n );\n }\n\n render() {\n if (!this.props.source) {\n return null;\n }\n return (\n <Modal visible={this.props.visible} transparent animationType=\"slide\" onRequestClose={this.closePopup.bind(this)}>\n <View\n style={{\n flex: 1,\n backgroundColor: '#000',\n paddingTop: StatusBarHeight(0),\n }}\n >\n <View style={styles.headerContent}>\n <TouchableOpacity onPress={this.closePopup.bind(this)} activeOpacity={0.6}>\n <Pl60Icon name=\"close\" style={[styles.menuIcon]} />\n </TouchableOpacity>\n <View style={styles.titleContainer}>\n <Text style={styles.title}>{this.props.title}</Text>\n </View>\n <TouchableOpacity onPress={this.download} activeOpacity={0.6}>\n <Icon type=\"font-awesome\" name=\"cloud-download\" iconStyle={[styles.menuIcon]} />\n </TouchableOpacity>\n </View>\n <View style={{ flex: 1, backgroundColor: '#fff' }}>\n {this.state.loaded ? null : <Spinner style={{ height: SCREEN_HEIGHT - StatusBarHeight(145), flex: 0 }} />}\n <WebView\n ref=\"PDFWebView\"\n source={{\n uri: this.getUrl(),\n }}\n renderError={e => {\n console.log('errored');\n console.log(e);\n }}\n style={[\n {\n flex: 1,\n backgroundColor: '#fff',\n },\n ]}\n onLoadStart={this.onLoadStarted.bind(this)}\n onLoadEnd={this.onLoadEnded.bind(this)}\n />\n </View>\n {this.renderFooter()}\n </View>\n </Modal>\n );\n }\n}\n\nconst styles = {\n container: {\n flex: 1,\n position: 'relative',\n backgroundColor: '#000',\n },\n innerContainer: {\n flex: 1,\n paddingLeft: 15,\n paddingRight: 15,\n },\n menuIcon: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: '#fff',\n zIndex: 3,\n },\n headerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n height: 70,\n },\n titleContainer: {\n flex: 1,\n },\n title: {\n color: '#fff',\n fontFamily: 'sf-semibold',\n fontSize: 16,\n textAlign: 'center',\n },\n footerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n height: 70,\n //alignSelf: 'flex-end'\n },\n chevron: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: '#fff',\n zIndex: 3,\n },\n footerText: {\n fontFamily: 'sf-regular',\n fontSize: 14,\n color: '#fff',\n width: 150,\n textAlign: 'center',\n },\n};\n\nexport { PDFPopup };\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAC9E,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,OAAO,KAAKC,UAAU,MAAM,kBAAkB;AAC9C,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,QAAQ,QAAQ,UAAU;AACnC,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,eAAe,EAAEC,WAAW,QAAQ,WAAW;AAExD,MAAMC,aAAa,GAAGT,UAAU,CAACU,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM;AAErD,MAAMC,QAAQ,SAASjB,SAAS,CAAC;EAAAkB,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,gBACvB;MACNC,MAAM,EAAE;IACV,CAAC;IAAAD,eAAA,mBAuBU,YAAY;MACrB,MAAME,cAAc,GAAG,MAAMd,UAAU,CAACe,aAAa,CAAC,IAAI,CAACC,KAAK,CAACC,MAAM,EAAEjB,UAAU,CAACkB,iBAAiB,GAAGb,WAAW,CAAC,IAAI,CAACW,KAAK,CAACC,MAAM,CAAC,CAAC;MACvI,MAAME,WAAW,GAAG,MAAMlB,OAAO,CAACmB,UAAU,CAACN,cAAc,CAACO,GAAG,EAAE;QAAEC,GAAG,EAAE;MAAc,CAAC,CAAC;IAC1F,CAAC;EAAA;EAxBDC,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,QAAQ,CAAC;MACZX,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;EAEAY,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACD,QAAQ,CAAC;MAC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AAS,EAAE;IACThB,IAAI,EAAE,CAAC;IACPiB,QAAQ,EAAE,UAAU;IACpBhB,eAAe,EAAE;EACnB,CAAC;EACDiB,cAAc,EAAE;IACdlB,IAAI,EAAE,CAAC;IACPmB,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE;EAChB,CAAC;EACDhB,QAAQ,EAAE;IACRiB,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,EAAE;IACXC,KAAK,EAAE,EAAE;IACTC,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDvB,aAAa,EAAE;IACbwB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBxE,MAAM,EAAE;EACV,CAAC;EACDiD,cAAc,EAAE;IACdL,IAAI,EAAE;EACR,CAAC;EACDM,KAAK,EAAE;IACLmB,KAAK,EAAE,MAAM;IACbI,UAAU,EAAE,aAAa;IACzBR,QAAQ,EAAE,EAAE;IACZG,SAAS,EAAE;EACb,CAAC;EACDvC,aAAa,EAAE;IACb0C,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxB1E,MAAM,EAAE;IACR;EACF,CAAC;EACDoC,OAAO,EAAE;IACP6B,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,EAAE;IACXC,KAAK,EAAE,EAAE;IACTC,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDjC,UAAU,EAAE;IACVoC,UAAU,EAAE,YAAY;IACxBR,QAAQ,EAAE,EAAE;IACZI,KAAK,EAAE,MAAM;IACbF,KAAK,EAAE,GAAG;IACVC,SAAS,EAAE;EACb;AACF,CAAC;AAED,SAASnE,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Component","View","TouchableOpacity","Modal","Dimensions","Text","Icon","WebView","FileSystem","Sharing","FontAwesome","Spinner","StatusBarHeight","getFileName","SCREEN_HEIGHT","get","height","PDFPopup","constructor","args","_defineProperty","loaded","downloadedFile","downloadAsync","props","source","documentDirectory","shareResult","shareAsync","uri","UTI","onLoadStarted","setState","onLoadEnded","onChangeIndex","index","getUrl","linkPrefix","closePopup","onClose","renderFooter","pdfCount","createElement","style","styles","footerContent","onPress","bind","activeOpacity","type","name","iconStyle","chevron","footerText","selectedIndex","render","visible","transparent","animationType","onRequestClose","flex","backgroundColor","paddingTop","headerContent","menuIcon","titleContainer","title","download","state","renderError","e","console","log","onLoadStart","onLoadEnd","container","position","innerContainer","paddingLeft","paddingRight","fontSize","padding","width","textAlign","color","zIndex","flexDirection","alignItems","fontFamily","justifyContent"],"sources":["PDFPopup.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { View, TouchableOpacity, Modal, Dimensions } from \"react-native\";\nimport { Text } from \"./Text\";\nimport { Icon } from \"@rneui/themed\";\nimport { WebView } from \"react-native-webview\";\nimport * as FileSystem from \"expo-file-system\";\nimport * as Sharing from \"expo-sharing\";\nimport { FontAwesome } from \"./Icon\";\nimport { Spinner } from \"./Spinner\";\nimport { StatusBarHeight, getFileName } from \"../helper\";\n\nconst SCREEN_HEIGHT = Dimensions.get(\"window\").height;\n\nclass PDFPopup extends Component {\n\tstate = {\n\t\tloaded: false,\n\t};\n\n\tonLoadStarted() {\n\t\tthis.setState({\n\t\t\tloaded: false,\n\t\t});\n\t}\n\n\tonLoadEnded() {\n\t\tthis.setState({\n\t\t\tloaded: true,\n\t\t});\n\t}\n\n\tonChangeIndex(index) {\n\t\tthis.props.onChangeIndex(index);\n\t}\n\n\tgetUrl() {\n\t\tconst linkPrefix =\n\t\t\t\"http://drive.google.com/viewerng/viewer?embedded=true&url=\";\n\t\treturn `${linkPrefix}${this.props.source}`;\n\t}\n\n\tdownload = async () => {\n\t\tconst downloadedFile = await FileSystem.downloadAsync(\n\t\t\tthis.props.source,\n\t\t\tFileSystem.documentDirectory + getFileName(this.props.source),\n\t\t);\n\t\tconst shareResult = await Sharing.shareAsync(downloadedFile.uri, {\n\t\t\tUTI: \"public.item\",\n\t\t});\n\t};\n\n\tclosePopup() {\n\t\tthis.props.onClose();\n\t}\n\n\trenderFooter() {\n\t\tif (this.props.pdfCount && this.props.pdfCount === 1) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<View style={styles.footerContent}>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tonPress={this.onChangeIndex.bind(this, -1)}\n\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\tname=\"angle-left\"\n\t\t\t\t\t\ticonStyle={[styles.chevron]}\n\t\t\t\t\t/>\n\t\t\t\t</TouchableOpacity>\n\t\t\t\t<Text style={styles.footerText}>\n\t\t\t\t\t{this.props.selectedIndex + 1} / {this.props.pdfCount}\n\t\t\t\t</Text>\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tonPress={this.onChangeIndex.bind(this, 1)}\n\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\tname=\"angle-right\"\n\t\t\t\t\t\ticonStyle={[styles.chevron]}\n\t\t\t\t\t/>\n\t\t\t\t</TouchableOpacity>\n\t\t\t</View>\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.props.source) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tvisible={this.props.visible}\n\t\t\t\ttransparent\n\t\t\t\tanimationType=\"slide\"\n\t\t\t\tonRequestClose={this.closePopup.bind(this)}\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\tbackgroundColor: \"#000\",\n\t\t\t\t\t\tpaddingTop: StatusBarHeight(0),\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<View style={styles.headerContent}>\n\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\tonPress={this.closePopup.bind(this)}\n\t\t\t\t\t\t\tactiveOpacity={0.6}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FontAwesome name=\"x\" style={[styles.menuIcon]} />\n\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t<View style={styles.titleContainer}>\n\t\t\t\t\t\t\t<Text style={styles.title}>{this.props.title}</Text>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t<TouchableOpacity onPress={this.download} activeOpacity={0.6}>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\tname=\"cloud-download\"\n\t\t\t\t\t\t\t\ticonStyle={[styles.menuIcon]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t</View>\n\t\t\t\t\t<View style={{ flex: 1, backgroundColor: \"#fff\" }}>\n\t\t\t\t\t\t{this.state.loaded ? null : (\n\t\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\theight: SCREEN_HEIGHT - StatusBarHeight(145),\n\t\t\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<WebView\n\t\t\t\t\t\t\tsource={{\n\t\t\t\t\t\t\t\turi: this.getUrl(),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\trenderError={(e) => {\n\t\t\t\t\t\t\t\tconsole.log(\"errored\");\n\t\t\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tstyle={[\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\t\t\tbackgroundColor: \"#fff\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\tonLoadStart={this.onLoadStarted.bind(this)}\n\t\t\t\t\t\t\tonLoadEnd={this.onLoadEnded.bind(this)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t\t{this.renderFooter()}\n\t\t\t\t</View>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tcontainer: {\n\t\tflex: 1,\n\t\tposition: \"relative\",\n\t\tbackgroundColor: \"#000\",\n\t},\n\tinnerContainer: {\n\t\tflex: 1,\n\t\tpaddingLeft: 15,\n\t\tpaddingRight: 15,\n\t},\n\tmenuIcon: {\n\t\tfontSize: 25,\n\t\tpadding: 15,\n\t\twidth: 55,\n\t\ttextAlign: \"center\",\n\t\tcolor: \"#fff\",\n\t\tzIndex: 3,\n\t},\n\theaderContent: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\theight: 70,\n\t},\n\ttitleContainer: {\n\t\tflex: 1,\n\t},\n\ttitle: {\n\t\tcolor: \"#fff\",\n\t\tfontFamily: \"sf-semibold\",\n\t\tfontSize: 16,\n\t\ttextAlign: \"center\",\n\t},\n\tfooterContent: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\theight: 70,\n\t\t//alignSelf: 'flex-end'\n\t},\n\tchevron: {\n\t\tfontSize: 25,\n\t\tpadding: 15,\n\t\twidth: 55,\n\t\ttextAlign: \"center\",\n\t\tcolor: \"#fff\",\n\t\tzIndex: 3,\n\t},\n\tfooterText: {\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 14,\n\t\tcolor: \"#fff\",\n\t\twidth: 150,\n\t\ttextAlign: \"center\",\n\t},\n};\n\nexport { PDFPopup };\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,QAAQ,cAAc;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