Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Error in originalURL #8

Closed
rehannali opened this issue Jul 15, 2017 · 15 comments
Closed

Error in originalURL #8

rehannali opened this issue Jul 15, 2017 · 15 comments
Labels

Comments

@rehannali
Copy link

rehannali commented Jul 15, 2017

I always get an error in originalURL "fatal error: unexpectedly found nil while unwrapping an Optional value" I debug code many times. I pass URL value to replaceVideo function but it didn't play my video. application crashes and gives me an error that I mentioned previously.
I attached screenshot so you can understand my problem better and give me appropriate solution.
screen shot 2017-07-15 at 9 10 32 pm

@VeinGuo VeinGuo added the bug label Jul 16, 2017
@VeinGuo
Copy link
Owner

VeinGuo commented Jul 16, 2017

@rehannali Hi I suspect that the crash is caused by URL encoding. fixed: 0f420b4
Maybe you can provide your test URL?

@rehannali
Copy link
Author

Actually, all URLs came as JSON through API so I don't exactly know which one of them causing an issue but I give you some URLs.
These are some URLs...
http://reflektions.world/files/Minions%20%28short%20film%29.mp4
http://reflektions.world/files/AWARD%20WINNING%20Best%20Short%20Video%20-%20Share.%20Care.%20Joy.%20-%20By%20Naik%20Foundation.mp4

@VeinGuo
Copy link
Owner

VeinGuo commented Jul 16, 2017

@rehannali Hey my judgment right. Is indeed a crash caused by URL encoding.
fixed: 0f420b4
Fix after the above two test links are no problem, before the crash.
Thank you man.

@rehannali
Copy link
Author

So now I need to update Pod to get all the changes?

@VeinGuo
Copy link
Owner

VeinGuo commented Jul 16, 2017

@rehannali yes, I updated the pod at 0.1.3 to fix this problem

@rehannali
Copy link
Author

@VeinGuo Thanks for help to resolve my issue.

@rehannali rehannali reopened this Jul 16, 2017
@rehannali
Copy link
Author

rehannali commented Jul 16, 2017

@VeinGuo I've a problem with fullscreen. I almost use the same code as an example and changed where I needed but full screen is not working. Could you please tell me what causes this problem?

@rehannali
Copy link
Author

I debug code related to full screen and there is some problem, the player isn't changing its location. It stays portrait. I add a player to the upper most hierarchy but I didn't know exact problem what should I do to solve this problem so player changes its state.

@VeinGuo
Copy link
Owner

VeinGuo commented Jul 16, 2017

I am running example in iOS10 and iOS 11 full screen can work.
Do not know why your full screen can not work, maybe you can paste some of the full-screen key code you write, so I can better know the cause of the problem.

@rehannali
Copy link
Author

rehannali commented Jul 16, 2017

Actually, I didn't write one. I'm using your code with some modifications. I'm using custom 2 example and did some modification related with ads. I separate run the example and it works perfectly. When I run in my project it didn't rotate to full screen but button changes its state. I didn't know exactly what is happening.

@rehannali
Copy link
Author

I attached some screenshots to identify the problem. This is code which I've changed from example custom 2. You see playerview initialization. This class is same as ads custom class.
screen shot 2017-07-16 at 6 50 54 pm
screen shot 2017-07-16 at 6 51 12 pm

@VeinGuo
Copy link
Owner

VeinGuo commented Jul 17, 2017

@rehannali Hi as you set in the picture.
image

But if you are only set to portrait, all the screen rotations are invalid.I have not found an excellent solution.

You can look at these two questions, may be able to solve your problem.
https://stackoverflow.com/questions/25651969/setting-device-orientation-in-swift-ios
https://stackoverflow.com/questions/26357162/how-to-force-view-controller-orientation-in-ios-8/28220616#28220616

@rehannali
Copy link
Author

I use now all settings you asked and as you use in your example project but still the same problem. I tried every thing but still, i can't resolve the full-screen problem even I override orientation function.

@rehannali
Copy link
Author

@VeinGuo I tried all solutions but now i can rotate screen but video enlarge at portrait mode. It is not going in landscape mode. Any solutions?

@rehannali
Copy link
Author

@VeinGuo My bad, there is a problem in AppDelegate. Thanks for the assistance. I know the problem and it should remove all conflicts and now code working fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants