Skip to content

Commit

Permalink
Merge pull request #345 from ooyala/PLAYER-3815
Browse files Browse the repository at this point in the history
[PLAYER-3815] Fix bug with building applications
  • Loading branch information
brol1dev authored Jun 28, 2018
2 parents eb1e93c + 0926957 commit f9bd918
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions ExoPlayerSampleApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ dependencies {
implementation 'com.android.support:recyclerview-v7:26.1.0'

// React-Native dependencies
implementation 'javax.inject:javax.inject:1'
implementation 'com.facebook.fresco:fresco:1.3.0'
implementation 'com.facebook.fresco:imagepipeline-okhttp3:1.3.0'
implementation 'com.facebook.soloader:soloader:0.1.0'
Expand Down
1 change: 1 addition & 0 deletions PlaybackLab/DownloadToOwnSampleApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ dependencies {
implementation 'com.facebook.stetho:stetho:1.2.0'
implementation 'com.facebook.stetho:stetho-okhttp:1.2.0'
implementation(group:'com.facebook', name:'react-native', version:'0.55.4', ext:'aar')
implementation 'javax.inject:javax.inject:1'

// Jackson dependency
implementation 'com.fasterxml.jackson.core:jackson-core:2.2.3'
Expand Down
1 change: 1 addition & 0 deletions PlaybackLab/FullscreenSampleApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.6.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.6.0'
implementation 'com.squareup.okio:okio:1.13.0'
implementation 'javax.inject:javax.inject:1'
implementation 'org.webkit:android-jsc:r174650'
implementation 'com.facebook.stetho:stetho:1.2.0'
implementation 'com.facebook.stetho:stetho-okhttp:1.2.0'
Expand Down
1 change: 1 addition & 0 deletions VRSampleApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ dependencies {
implementation 'com.facebook.stetho:stetho:1.2.0'
implementation 'com.facebook.stetho:stetho-okhttp:1.2.0'
implementation(group:'com.facebook', name:'react-native', version:'0.55.4', ext:'aar')
implementation 'javax.inject:javax.inject:1'

implementation 'com.fasterxml.jackson.core:jackson-core:2.2.3'
implementation 'com.google.code.findbugs:jsr305:3.0.0'
Expand Down
1 change: 1 addition & 0 deletions VRSampleAppKotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ dependencies {
implementation 'com.facebook.stetho:stetho:1.2.0'
implementation 'com.facebook.stetho:stetho-okhttp:1.2.0'
implementation(group:'com.facebook', name:'react-native', version:'0.55.4', ext:'aar')
implementation 'javax.inject:javax.inject:1'

testCompile 'junit:junit:4.12'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ open class VideoFragment() : Fragment(), Observer, DefaultHardwareBackBtnHandler
this.arguments = args
}

override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val inflated = inflater?.inflate(R.layout.video_fragment, container, false)
val arguments = getArguments()
if (arguments != null) {
Expand All @@ -64,7 +64,7 @@ open class VideoFragment() : Fragment(), Observer, DefaultHardwareBackBtnHandler
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)

if (ContextCompat.checkSelfPermission(context, WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) {
if (context?.let { ContextCompat.checkSelfPermission(it, WRITE_EXTERNAL_STORAGE) } != PERMISSION_GRANTED) {
requestPermissions(arrayOf(WRITE_EXTERNAL_STORAGE), PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE)
} else {
writeStoragePermissionGranted = true
Expand Down Expand Up @@ -146,7 +146,7 @@ open class VideoFragment() : Fragment(), Observer, DefaultHardwareBackBtnHandler
player?.addObserver(this)

val skinOptions = SkinOptions.Builder().build()
playerController = OoyalaSkinLayoutController(activity.application, playerSkinLayout, player, skinOptions)
playerController = OoyalaSkinLayoutController(activity!!.application, playerSkinLayout, player, skinOptions)
playerController?.addObserver(this)

initAdManager()
Expand All @@ -155,6 +155,6 @@ open class VideoFragment() : Fragment(), Observer, DefaultHardwareBackBtnHandler
}

override fun invokeDefaultOnBackPressed() {
activity.onBackPressed()
activity!!.onBackPressed()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ class VideoRecyclerFragment : Fragment() {
val TAG = VideoRecyclerFragment::class.java.canonicalName
}

override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? =
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
inflater?.inflate(R.layout.video_recycler_fragment, container, false)

override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)

videoRecyclerView.layoutManager = LinearLayoutManager(context)
videoRecyclerView.adapter = VideoRecyclerAdapter(AdList.instance.getVideoList(context), {
handleItemChose(data = it)
})
videoRecyclerView.adapter = context?.let { AdList.instance.getVideoList(it) }?.let {
VideoRecyclerAdapter(it, {
handleItemChose(data = it)
})
}
}

private fun handleItemChose(data: VideoData) {
Expand Down

0 comments on commit f9bd918

Please sign in to comment.