Hello Chaaminda,
If I'm understanding your question, you are unable to play videos using the Safari app on your iPad. You are also unable to use the YouTube app on the iPad to play videos, is that right?
I would first suggest clearing the stored information in Safari. Tap Settings > Safari > Clear History and Website Data.
Then quit Safari, YouTube and any other apps that play or stream videos that may be open on the iPad.
Force an app to close in iOS - Apple Support
https://support.apple.com/en-us/HT201330
Finally, restart your iPad
Restart your iPhone, iPad, or iPod touch - Apple Support
https://support.apple.com/en-us/HT201559
Chaaminda, give these troubleshooting steps a try and let us know if the issue persists.
Regards,