Sanket

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • SanketSanket
    Participant

    No problem @enupgames. It was similar to the issue I was facing, so its ok.

    Hi Piotr, Any update on this?

    SanketSanket
    Participant

    Well, I tried that, but the in-game audio is not paused/stopped, its muted maybe because the InAppBrowser video player takes over the audio on playing a video. Even if I increase the volume it does not change anything.

    But if I press the home button in android, and open the app again, I am able to hear back the in-game sound.

    Now, this was the actual issue that I raised here. I thought because I was playing a video in the IAB, the instance might not be closing properly on browser close and this might be causing the in-game audio to not resume.

    Normally, when I open the IAB browser, the in-game audio is playing no matter which web page I load, but the moment I play a video, it does not return to the in-game audio on browser close and no sounds are not heard on the speaker (not even button clicks) after that.

    • This reply was modified 1 year, 5 months ago by SanketSanket. Reason: typo
    SanketSanket
    Participant

    Hi,

    I tried the new jar file in the project that I shared with you on email, but it still doesn’t seem to solve my issue of in-game sound going mute on closing the IAB.

    You can try the project I shared with you where I have just edited your sample scene to have a text box to enter a URL to be opened in IAB on button click. And I am having a background score playing on a loop in the background.

    I tried the new InAppBrowser.jar, that you shared, in this project and the results are still the same, the in-game sound goes on mute on closing the browser playing a video.

    Just FYI, the unity project is on my google drive here:
    https://drive.google.com/drive/folders/113b4PUcR5Pq5FL2dVBdgo6vh8k6ZxH_n?usp=sharing

    Hope this helps.

    SanketSanket
    Participant

    Well, you are right, Unity does have a Video playing API to play videos, but it is quite bad for streaming online videos.

    The native implementation of InAppBrowser allows it to use native video players that are far better at streaming online videos than Unity’s API. While in fact, it does stream our videos quite well, but only on browser close, the native video player still keeps on playing the video in the background.

    SanketSanket
    Participant

    You can try this URL: https://www.triumdesigns.com/media/default.mp4

    I guess when the browser plays a video, it might be using the internal video player of the corresponding platform and this internal video player does not get closed on browser close. I can say this from the video player UI on iOS. The player keeps on playing the video in the background when I close the InAppBrowser while the video is playing. You will still be able to hear the sound of the video after closing the browser. If I pause the video and then close the browser, it works normally.

    Let me know if I can somehow work around this.

    SanketSanket
    Participant

    Understood. Thanks for sharing the information and helping me out.

    SanketSanket
    Participant

    See Piotr, I considered this as an issue as for me a browser should open any kind of URL as long as the URL is active and valid, irrespective of whether the URL has http:// or https://. The requirement of an SSL certificate on webservers for iOS apps can be considered valid as Apple wants its devices to communicate securely with the web servers. But a mobile web browser on iOS devices should open all kinds of web pages even the ones without the SSL certificate. And we already see this happening all browser apps like Chrome, Firefox, etc. which must be following the protocol to communicate with their web servers but allows to open any and all kind of URLs.

    Now, in this case, an InAppBrowser is expected to work similar to a web browser inside an app and open any and all kinds of active and valid URLs. I hope you understand this as a justifiable expectation. Your solution of adding App Transport Security in Xcode did work for me and for unity we can create a post process build monobehaviour to add this to the Info.plist after the Xcode project is built to avoid manually changing this in Xcode. You can find a reference to this method here – https://answers.unity.com/questions/1431654/app-transport-security-has-blocked-a-cleartext-htt.html

    Now, as far as cross-platform capabilities and other features of an in-app browser are concerned, IAB asset does an excellent job. I hope you come up with a more robust solution for this as well.

    Regards,
    Sanket.

    SanketSanket
    Participant

    Ok, let me explain.

    I have InAppBrowser integrated into my Unity iOS app for opening any/all URLs in an internal browser instead of sending the user off to an external browser app. Now the URLs could be either http:// or https:// based on the website the Url belongs to and I have couple of http:// based website URLs and a couple of https:// based website URLs.

    Now in the player settings of my Unity iOS app if I disable ‘Allow downloads over HTTP (nonsecure)’ checkbox(for publishing on App Store) and build the app, http:// based URLs are not opening in the InAppBrowser. The InAppBrowser panel opens but the webpage does not load and loader stays on forever.

    To reproduce this issue, simply open the ExampleScene from InAppBrowser asset in a Unity iOS project and set the URL as ‘https://www.kokosoft.pl/’ in the URL box in the BrowserOpener component. Then disable the ‘Allow downloads over HTTP (nonsecure)’ checkbox in the iOS player settings and build it. The webpage at the url ‘https://www.kokosoft.pl/’ will not load in the InAppBrowser.

    Please try this once and let me know if you are able to reproduce this at your end.

    SanketSanket
    Participant

    Hi Piotr,

    Please update on this issue. Were you able to reproduce this at your end?

    SanketSanket
    Participant

    Hi Piotr!
    Do you have any update on this now?

    • This reply was modified 2 years, 2 months ago by SanketSanket.
    SanketSanket
    Participant

    Hi Piotr,

    Were you able to reproduce the issue?

    SanketSanket
    Participant

    Hi Piotr,

    Thanks for the quick response.

    Now yes, the sample scene works and the warning message seems to be understandable.

    But now that I saw the issue properly, it appears that non-HTTPS URLs like (https://www.kokosoft.pl) are not opening in the InAppBrowser in the iOS app with the 2.0.1 version of IAP. Now as made mandatory for iOS apps, I disable the ‘Allow downloads over HTTP (nonsecure)’ box in Unity iOS Player Settings for the sample scene of IAP and build it. And in this case, I am able to open all HTTPS-based websites URLs but non-HTTPS based URLs do not open in the InAppBrowser with the loader staying on forever. Also, it does not throw any error in the logs.

    Now it does work if I enable the ‘Allow downloads over HTTP (nonsecure)’ box in the iOS Player Settings but again I need it to be disabled for publishing the app to the App Store.

    Is it an issue in IAP or am I missing something?

    in reply to: Version 2.0.0 not building on iOS #1747
    SanketSanket
    Participant

    Cool, regenerating the Xcode project worked.

    Thanks.

    in reply to: Version 2.0.0 not building on iOS #1744
    SanketSanket
    Participant

    If I remove all the files and just put ‘InAppWebBrowser.a’ in Plugins/iOS folder, then I get below error in Xcode build:

    error: Build input file cannot be found: ‘/Users/tdpl/Documents/BuildsIphone/SooperpopTest/Libraries/Plugins/iOS/iOSInAppBrowser.mm’ (in target ‘Unity-iPhone’ from project ‘Unity-iPhone’)

    in reply to: Version 2.0.0 not building on iOS #1741
    SanketSanket
    Participant

    Hi Piotr,

    I have a similar problem, I removed all the old files Plugins folder and the entire InAppBrowser folder from the project. Then I import the updated 2.0.0 version from the Asset Store and I get below error in Xcode:

    error: Build input file cannot be found: ‘/Users/tdpl/Documents/BuildsIphone/SooperpopTest/Libraries/Plugins/iOS/iOSInAppBrowser.mm’ (in target ‘Unity-iPhone’ from project ‘Unity-iPhone’)

    Now, iOSInAppBrowser.mm file was there in the plugins/iOS folder along with below files
    InAppBrowserViewController.mm
    InAppBrowserViewController.h
    MyNativeBindings.mm
    OrientationNavigationViewController.h
    OrientationNavigationViewController.m

    I deleted all of them before importing the version 2.0.0 and now the iOS folder just contains InAppWebBrowser.a file in Plugins/iOS folder.

    Now when I keep all the above files and build with the latest 2.0.0 version, I get 26 duplicate symbols error.

    What am I missing here? Could you please tell me what files to delete and what to keep while upgrading to 2.0.0?

Viewing 15 posts - 1 through 15 (of 16 total)