Run a javascript code for streaming

Hi. I using ionc 2.
I have a script that was provided by a video streaming company. I use this script on a website, and it runs perfectly. I’m creating a simple ionic application just to run this video player which is executed by js code. I honestly have no idea how to put this code on ionic. I created a view called TV and a file called tv.ts. I’ve seen that I can not put the script in the view so I’d rather have it on tv.ts, but I’m not very familiar with the syntax of ts. If anyone can help me? The code I use on my site is this:

<div id="playerc6e8a9d59f9d17e244f07a420bfb501610a8ef58"></div> <script>

eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('19 3=6.18(\'3\');3.17=\'//2.0.1/9/9.16\';3.20=21(){24({23:22.15.14+\'//\'+\'10.2.0.1/13/12/11.2.0.1.25?42=37\',36:\'//7.2.0.1:8/4/5/4/38.26\',39:\'//7.2.0.1:8/4/5/4/41.40\',35:\'34\',29:28,27:30,31:\'\',})};6.33.32(3);',10,43,'com|br|sitehosting|script|vidal|_definst_|document|streaming59|1935|shplayer|www|vidal_vidal_streaming59|playerpic|controle|protocol|location|js|src|createElement|var|onload|function|window|poster|SHPlayer|jpg|mpd|live|false|autoPlay|true|backup|appendChild|body|playerc6e8a9d59f9d17e244f07a420bfb501610a8ef58|id|dash|1481449398|manifest|hls|m3u8|playlist|_'.split('|'),0,{}))
            </script>