-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRJLTVA-670 React Native common videoclips.json (#38)
* Self review * Update react debbugging docs * Changed to official resources path * Self review * Update JuvoReactNative/index.tizen.js Co-Authored-By: Pawel Panek/Multichannel Video Services (VD) /SRPOL/Staff Engineer/Samsung Electronics <[email protected]> * Update docs/debugging.md Co-Authored-By: Pawel Panek/Multichannel Video Services (VD) /SRPOL/Staff Engineer/Samsung Electronics <[email protected]> * Added notification on videoclips.json download error * Removed redundant if statement * Changed to official videoclips.json path * Review fixes * Fixed scrollview position after leaving deeplink content
- Loading branch information
Showing
20 changed files
with
95 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,27 @@ | ||
import videoclipsdata from '../videoclips.json'; | ||
|
||
const ResourceLoader = { | ||
tileNames: ['car', 'bolid', 'sintel', 'oops', 'tosposter', 'artofwalking', 'tosposter', 'bunny', 'sintel', 'sacrecoeur', 'tosposter', 'canimals', 'testwatchscreen', 'bunny'], | ||
tilesPath: { | ||
car: require('../images/tiles/car.png'), | ||
bolid: require('../images/tiles/bolid.png'), | ||
sintel: require('../images/tiles/sintel.png'), | ||
oops: require('../images/tiles/oops.png'), | ||
tosposter: require('../images/tiles/tos-poster.png'), | ||
artofwalking: require('../images/tiles/artofwalking.png'), | ||
bunny: require('../images/tiles/bunny.png'), | ||
sacrecoeur: require('../images/tiles/sacrecoeur.png'), | ||
canimals: require('../images/tiles/canimals.png'), | ||
testwatchscreen: require('../images/tiles/testwatchscreen.png'), | ||
default: require('../images/tiles/default_bg.png'), | ||
contentDescriptionBackground: require('../images/tiles/content_list_bg.png') | ||
}, | ||
tilePathSelect: name => { | ||
if (name === null) return ResourceLoader.tilesPath.default; | ||
|
||
const tileArray = { | ||
car: ResourceLoader.tilesPath.car, | ||
bolid: ResourceLoader.tilesPath.bolid, | ||
sintel: ResourceLoader.tilesPath.sintel, | ||
oops: ResourceLoader.tilesPath.oops, | ||
tosposter: ResourceLoader.tilesPath.tosposter, | ||
artofwalking: ResourceLoader.tilesPath.artofwalking, | ||
bunny: ResourceLoader.tilesPath.bunny, | ||
sacrecoeur: ResourceLoader.tilesPath.sacrecoeur, | ||
canimals: ResourceLoader.tilesPath.canimals, | ||
testwatchscreen: ResourceLoader.tilesPath.testwatchscreen, | ||
default: ResourceLoader.tilesPath.default, | ||
contentDescriptionBackground: ResourceLoader.tilesPath.contentDescriptionBackground | ||
}; | ||
if (tileArray[name] == null) return ResourceLoader.tilesPath.default; | ||
return tileArray[name]; | ||
}, | ||
clipsData: videoclipsdata, | ||
playbackIconsPath: { | ||
play: require('../images/btn_viewer_control_play_normal.png'), | ||
ffw: require('../images/btn_viewer_control_forward_normal.png'), | ||
rew: require('../images/btn_viewer_control_back_normal.png'), | ||
set: require('../images/btn_viewer_control_settings_normal.png'), | ||
pause: require('../images/btn_viewer_control_pause_normal.png') | ||
}, | ||
playbackIconsPathSelect: name => { | ||
if (name === null) return ResourceLoader.tilesPath.default; | ||
|
||
const tileArray = { | ||
play: ResourceLoader.playbackIconsPath.play, | ||
ffw: ResourceLoader.playbackIconsPath.ffw, | ||
rew: ResourceLoader.playbackIconsPath.rew, | ||
set: ResourceLoader.playbackIconsPath.set, | ||
pause: ResourceLoader.playbackIconsPath.pause, | ||
default: ResourceLoader.tilesPath.default | ||
}; | ||
if (tileArray[name] == null) return ResourceLoader.tilesPath.default; | ||
return tileArray[name]; | ||
} | ||
}; | ||
|
||
export default ResourceLoader; | ||
import { NativeModules } from 'react-native'; | ||
|
||
const ResourceLoader = { | ||
path: 'https://raw.githubusercontent.com/SamsungDForum/JuvoPlayer/master/Resources/', | ||
clipsData: [], | ||
errorMessage: '', | ||
load: () => fetch(ResourceLoader.path + 'videoclips.json').then((response) => response.json()) | ||
.then((responseJson) => { | ||
ResourceLoader.clipsData = responseJson; | ||
ResourceLoader.tilePaths = responseJson.map((clip) => ResourceLoader.path + clip.poster); | ||
}) | ||
.catch((error) => { | ||
ResourceLoader.errorMessage = error; | ||
}), | ||
tilePaths: [], | ||
contentDescriptionBackground: require('../images/tiles/content_list_bg.png'), | ||
defaultImage: require('../images/tiles/default_bg.png'), | ||
playbackIcons: { | ||
play: require('../images/btn_viewer_control_play_normal.png'), | ||
ffw: require('../images/btn_viewer_control_forward_normal.png'), | ||
rew: require('../images/btn_viewer_control_back_normal.png'), | ||
set: require('../images/btn_viewer_control_settings_normal.png'), | ||
pause: require('../images/btn_viewer_control_pause_normal.png') | ||
} | ||
} | ||
|
||
export default ResourceLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.